6

I primarily use JDeveloper 10 with JDK 1.4.2 on Vista. I would like to install Eclipse and have it run the latest JDK 6.

Is this possible without conflict?

Ideally I would like to just use JDeveloper and switch back/forth between JDK versions. Is this possible?

user77826
  • 99
  • 1
  • 2

4 Answers4

6

It is indeed possible, you can have as many JDKs in system as you wish. Just install them into different directories, then you can add a new JDK to your IDE (they support having multiple).

You can choose one on per-project basis.

alamar
  • 18,729
  • 4
  • 64
  • 97
  • 1
    Indeed - I have all the latest updates of Java 2, 3, 4, 5 and 6 installed, and a codebase that compiles each package to differing JDK versions (e.g. my GUI programs target Java 6, but others might target Java 3, while all core library packages target Java 2). – Lawrence Dol Jun 10 '09 at 01:23
  • Nitpick: You cannot really add JDKs to Eclipse, only JREs (which a JDK always includes). Eclipse will use these only for running your programs. Compilation always uses Eclipse's internal compiler (whose settings can be configured under Prefs/Java/Compiler). – sleske Nov 23 '11 at 14:43
2

I am not sure with JDeveloper 10, but in eclipse you can specify which installed JDK you wish you use under window>preferences>Java>Installed JREs.

Rich Kroll
  • 3,995
  • 3
  • 23
  • 28
1

You can specify the JRE for Eclipse to run under with the -vm command line switch or in eclipse.ini. e.g. -vm "%JAVA_HOME%/bin/javaw.exe"

You can specify the JRE for executed code via the Window:Preferences:Java:Installed JREs menu.

Chris Nava
  • 6,614
  • 3
  • 25
  • 31
-1

If you select project properties in Eclipse, then Java Build Path, you can choose a different JDK to use when building the project.

bm212
  • 1,429
  • 11
  • 12
  • -1 This is very misleading. First, ou don't need a JRE when building, you need a JDK. And secondly, to change the build that Eclipse performs, you must change settings under Preferences/Java/Compiler. – sleske Nov 23 '11 at 14:42
  • At any rate, usually you just want to *run* with a different JDK/JRE version. That is configured in the "Run/Debug" dialog. – sleske Nov 23 '11 at 14:42