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 Stover
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?

Ben
(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 Pellaton
Messages: 289
Registered: July 2009
Senior Member
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 Go to previous message
sagar  is currently offline sagar
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

-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
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: Sat Oct 25 00:39:28 GMT 2014

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

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