Saturday, January 7, 2012

Specifying a Java Virtual Machine (JVM) for Eclipse IDE


In a developer machine with multiple Java SDK installed, you may specify which Java Virtual Machine (JVM) is used for your Eclipse IDE. To specify it, edit the “eclipse.ini” file as follow.

In my example, I have a Java 1.6.0_30 installed at “C:\Java\jdk1.6.0_30″.

The following is the ”eclipse.ini” file in the Eclipse IDE directory

-vm
C:/Java/jdk1.6.0_30/bin/javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
–launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
–launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m