Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Is eclipse.ini the only place where jdk for Eclipse itself is specified?
Is eclipse.ini the only place where jdk for Eclipse itself is specified? [message #712172] Sun, 07 August 2011 04:41 Go to next message
Ben StoverFriend
Messages: 104
Registered: January 2010
Senior Member
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?

(no subject) [message #712333 is a reply to message #712172] Sun, 07 August 2011 05:59 Go to previous messageGo to next message
Michael Pellaton is currently offline Michael PellatonFriend
Messages: 289
Registered: July 2009
Senior Member

- 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:

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,
Re: (no subject) [message #712750 is a reply to message #712333] Sun, 07 August 2011 17:53 Go to previous message
sagar  is currently offline sagar Friend
Messages: 12
Registered: August 2011
Junior Member
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

Previous Topic:SWT -- "no swt-pi-coca-3735 found in java.library.path"
Next Topic:modified abstract syntax tree needs to be reflected back to original source file
Goto Forum:

Current Time: Wed Apr 25 13:00:59 GMT 2018

Powered by FUDForum. Page generated in 0.02069 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software