Is eclipse.ini the only place where jdk for Eclipse itself is specified? [message #712172] |
Sun, 07 August 2011 04:41  |
Eclipse User |
|
|
|
As you know Eclipse itself needs a Java JDK to run. So I am NOT talking about developing Java programs inside Eclipse but the JDK for Eclipse itself.
Assume now I want (temporarily) switch the used JDK version/installation for Eclipse.
Can I simply close Eclipse then modify the path entry in file eclipse.ini and restart Eclipse?
Or is there any other place where the responsible JDK for Eclipse is/needs to be specified?
Ben
|
|
|
(no subject) [message #712333 is a reply to message #712172] |
Sun, 07 August 2011 05:59   |
Eclipse User |
|
|
|
Hi,
- Eclipse.ini is the most static way. I as a maintainer of our
corporate Eclipse distribution don't want our people mess around
in this file as a lot of things can go wrong.
- If you just don't do anything, the JVM from the PATH is taken. So
one possibility is to set JAVA_HOME and PATH=$JAVA_HOME/bin:$PATH
(linux, osx) or PATH=%PATH%\bin;%PATH% (windows). Switching the
Java version now boils down to changing JAVA_HOME.
- The most flexible way to specify the java version is the -vm command
line option of Eclipse.
Further reading:
- http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F
- http://bit.ly/oNl26v
I suggest you specify the default java version using environment
variables and if you temporarily need to deviate from the default,
use the -vm command line option.
Hope this helps,
Michael
|
|
|
Re: (no subject) [message #712750 is a reply to message #712333] |
Sun, 07 August 2011 17:53  |
Eclipse User |
|
|
|
If you want to specify the JDK in eclipse.ini file , you need to include
" -vm
C:/Java/jdk1.6.0/jre/bin/client/jvm.dll "
include above statement in your eclipse.ini file . And yes -vm and c:/ ... both should be on separate line and before "openFile" command in ini file, See my eclipse.ini fie below: (Note: One imp thing is that you should uninstall JRE , if any installed in ur PC, and install just JDK 1.6/ or latest one... It should work
-vm
C:/Java/jdk1.6.0/jre/bin/client/jvm.dll
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
|
|
|
Powered by
FUDForum. Page generated in 0.04749 seconds