13

I have three project running on eclipse i want to use JDK 1.4 for two project and JDK 1.6 for third project how do i do that?

RPB
  • 16,006
  • 16
  • 55
  • 79
  • 2
    Also note there is two things here: One being which JVM Eclipse uses to _run_ your program, and the other what JVM the Eclipse _compiler_ targets. – Thorbjørn Ravn Andersen Jan 09 '11 at 11:50
  • 1
    On a note unrelated to this question: **DO NOT** add "Thanks in advance" or similar clutter to posts. See this post: http://meta.stackexchange.com/questions/2950/should-hi-thanks-taglines-and-salutations-be-removed-from-posts – NullUserException Oct 08 '12 at 19:50

2 Answers2

15

You need:

alt text

The default JRE is shown with a check mark and is used by new eclipse projects unless the project specifically overrides the value.
So the next step is to check which JRE the current project is using.

  • Right click the project and choose "properties".
  • Select "Java Build Path" and then click the tab labeled "Libraries". You should see an entry like "JRE System Library [version]".
    To change the JRE version,
    • highlight the entry and click "Remove".
    • Then click "Add Library...". Choose "JRE System Library".
      If you choose "Workspace Default", the project will use the JRe defined under "Windows -> Properties" as explained above.
      You may also specify an alternate JRE located somewhere on your file system, or choose an embedded execution environment provided by Eclipse.
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
1

you can configure VM in eclipse.ini file.

p27
  • 2,217
  • 1
  • 27
  • 55
  • Thanks @p27, I needed a 32 bits JDK to work with a custom 32-bits Eclipse, while my JAVA_HOME is set to a 64 bits. – Alex May 21 '18 at 14:11