Fixing Problems in Eclipse
Thursday, July 24th, 2008I really love eclipse. Nevertheless, it seems to cause problems fairly often, and so I decided to keep a log of each of the things that I fix.
Workspace is in use or cannot be created
There are three things that I found that cause this:
- You have another Eclipse instance accessing the same workspace at the same time
- An unclean shutdown left stale file locks
- You are using NFS and the locking daemon isn’t working properly
Situation 1 is of course the easiest to solve; just close the other version of eclipse.
Situation 2 requires you to delete the .metadata/.lock file from the workspace you’re trying to open.
Situation 3 may be resolved by passing the following argument to the JVM:
-Dosgi.locking=none
For example:
./eclispe -vmargs -Dosgi.locking=none -Xms512m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=512m
Note the -vmargs argument, which marks the start of the JVM arguments.
SVN Doesn’t Work with JavaHL
If you’re using Ubuntu, add the following line to eclipse.ini:
-Djava.library.path=/usr/lib/jni
For example, my eclipse.ini looks like this:
-showsplash org.eclipse.platform -framework plugins/org.eclipse.osgi_3.4.2.R34x_v20080826-1230.jar -vmargs -Dosgi.requiredJavaVersion=1.5 -Djava.library.path=/usr/lib/jni -Xms40m -Xmx256m -XX:MaxPermSize=256m