i have a jar file of jdk 1.4 version.But as per the requirement in my project,we are restricted to use jdk 1.6 version only.I googled many site but not getting exact way.And also how can i build the java project in eclipse from existing jar?Any help on this?
If you are mentioning a jar file which is compiled on jdk1.4 then it will run on jdk1.6 without fail. In eclipse if you want to change the jre version follow the below steps
1. Click on Windows ->Preferences
2. Check for java in search(or find it directlty). Click on java and then click on Installed JRE's. You will find the jre version in which eclipse is using. Change the version of jdk as per your needs. Also change the compiler version too.
Eclipse(not only eclipse most of the IDE's) provides provision to change the jdk as per needs. But vice-versa won't work(higher version in lower version of jdk)