måndag 14 maj 2012

Eclipse - Get it to run and work with Java 7

When I updated to a Java 7 runtime on my Windows 7 machine Eclipse started to behave wired. Plugins stopped working, downloads stalled and Eclipse crashed from time to time.

After some digging I found out that there apparently is a issue with Java 7 which could be the problem. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=317785 for a explanation. The solution from the post is either to install the latest JDK, JVM and the latest Eclipse, or add a VM property like
-Djava.util.Arrays.useLegacyMergeSort=true. Check, but if none of them work? And you still have the problem?

To solve this issue I installed the latest JDK1.6 update 32 and added the path to Eclipse as a parameter. Now Eclipse starts using this JDK instead of my default Java 7 installation and everything works like a charm. See http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html for all runtime options.

To make Eclipse run on a different VM add the -vm paramter as a start command to Eclipse with the path to you VM. In Windows this looks like:

Properties for eclipse.bat, add -vm "PATH_TO_YOU_VM"

You should be able to do this configuration in eclipse.ini, but that did not work for me.

You can verify which VM you are running on by going to Help -> About Eclipse -> Click on "Installation Details" -> Configuration in Eclipse.

Inga kommentarer:

Skicka en kommentar