Reputation: 4852
I am using a windows machine with multiple version of JRE installed.
If I run an eclipse RCP application, which version of JRE it will be using, the latest JRE version or the one mentioned under JAVA_HOME
in Environment Variables -> System Variables
?
Upvotes: 1
Views: 2094
Reputation: 3085
It must be using the default JRE that's available in your OS path first unless you override it by specifying -vm arg in .ini file.
Upvotes: 1
Reputation: 41132
In the eclipse.ini
file in the Eclipse installation directory, you can add the lines:
-vm
C:/Java/jdk1.7.0_09_x64/jre/bin/server/jvm.dll
Of course, adjust the path to the JDK / JRE you want Eclipse to use.
[EDIT] Re-reading your question, I notice you mention "and eclipse RCP application", so perhaps you mean something else than Eclipse. The answer might be different then. I suggest you add more tags (and improve the subject) to reflect better the scope of your question.
[EDIT] From a quick research, it seems that Eclipse RPC applications also use an .ini file (that's the case of the Eclipse Memory Analyzer I have on my disk), so my trick above might work... It might depend on the launcher you want to use, too.
Upvotes: 3
Reputation: 1994
Eclipse will be executed in the VM defined in JAVA_HOME
by default.
But you may change the JRE/JDK, programs are executed/compiled with under Eclipse > Windows > Preferences > Java > Installed JREs.
Upvotes: 1