Sun Java 1.6.0_21 Not Detected By Eclipse

A quick-fix to get Eclipse running again after an automatic update makes the Sun JVM again undetectable..

Object Partners

A “new” bug has been swirling around places like Slashdot, making it sound like Eclipse is broken. The bug is related to a change in the latest release of Java, v1.6.021, not Eclipse. It’s getting some attention because a lot of people are encountering it after accepting an automatic update to Java (particularly on Windows). It is a bug manifested in Eclipse by a change in the new Java runtime. It really goes back to an old bug (squashed in 3.3) where Eclipse couldn’t detect the Sun JVM; same bug now, because they’re changing the VM since Oracle’s sticking their name in everything. A note has been recently added to the [permgen size FAQ](http://wiki.eclipse.org/FAQ\HowdoIincreasethepermgensizeavailableto_Eclipse%3F) page at Eclipse.org giving a little more detail than this.

It can be circumvented (or rather, postponed to the point of probably not happening) by increasing the garbage collection memory size by adding (or updating) the following two lines to your eclipse.ini file (on Windows and Linux, look right in the root of the Eclipse folder, for Mac, it’s deeper in the Library folders). If the settings aren’t there to be updated, add them just before the -vmargs, making sure not to split any other parameters. --launcher.XXMaxPermSize 512m You can choose a size larger than that if your machine supports it, or the delay until it runs out of memory isn’t enough. Always enter values in MB.

Alternatively (or additionally), you can specify the JVM to use by adding it’s path to the eclipse.ini file (again, before the -vmargs) to avoid the bug in the 1.6.021 runtime. This example uses the Java installed with the JDK instead of just the Java SE runtime that the path suggests. `-vm C:/Program Files/Java/jdk1.6.020/bin/javaw.exe` Of course, your path may vary.

Share this Post

Related Blog Posts

JVM

Dojo Datagrid

July 23rd, 2010

Using the newest version of the Dojo DataGrid

Object Partners
JVM

Spring Release v3.0.3

July 9th, 2010

Spring released version 3.0.3 of the Spring Framework

Object Partners
JVM

Ten Minutes With Eclipse Helios

July 6th, 2010

On June 23rd, Eclipse launched their new release (v3.6), named Helios. Heres (good) impressions after playing with it for about ten minutes.

Object Partners

About the author