Reputation: 18848
I need to compile my project to Java 1.5 Runtime. However I want my eclipse to use 1.6/1.7 JDK to take few advantages to run eclipse smoothly.
If possible, I want my tomcat to use JDK6 or JDK7, but however it shouldn't effect the project which is compiled to 1.5 (i think it will be handled by JVM without issues)
But I just need small help in configuring Eclipse to JDK6/7 but it should compile projects to 1.5
Upvotes: 0
Views: 88
Reputation: 597076
To define which JDK/JRE to use when running eclipse, open eclipse.ini and put -vm /path/to/jdk-jre/bin
e.g.:
...
--launcher.XXMaxPermSize
384M
-vm
C:/Program Files/Java/jdk1.7.0/jre/bin
-vmargs
...
Upvotes: 1
Reputation: 7853
You should be able to specify a JRE to project using the following commands:
Project -> Properties ->Java Build Path -> Libraries -> Add Library -> JRE System Library -> Alternate JRE
(select the JRE for the project)
Upvotes: 0