Saturday, November 8, 2008

Eclipse SDK 3.4.1 under xubuntu 8.04

Today I wanted to install eclipse on my rather old desktop machine which runs on xubuntu 8.04. First I tried to use the package manager as described here. I did not trust my eyes when I first started it up: Eclipse 3.2! As I need Eclipse 3.4 I removed the just installed old eclipse and downloaded the lastest release of Eclipse SDK directly from eclipse .
After "un-taring" the whole thing into "/opt" with the sudo command I followed the forum thread as mentioned above to use Sun's JDK instead of the built in GNU Java. Everything worked fine until I started the brand new eclipse with my normal working user.... I got the following exception and the workbench didn't come up:

me@mymachine:/opt/eclipse$ ./eclipse
!SESSION 2008-11-08 18:28:24.055 -----------------------------------------------
eclipse.buildId=M20080911-1700
java.version=1.6.0_07
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=de_DE
Command-line arguments: -os linux -ws gtk -arch x86

!ENTRY org.eclipse.osgi 4 0 2008-11-08 18:28:24.525
!MESSAGE Error reading configuration: /opt/eclipse/configuration/org.eclipse.osgi/.manager/.fileTableLock (No such file or directory)
!STACK 0
java.io.FileNotFoundException: /opt/eclipse/configuration/org.eclipse.osgi/.manager/.fileTableLock (No such file or directory)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.(RandomAccessFile.java:212)
[....]


Damn! Another round of googling... . Unfortunately Google only spit out one post - in italian. Luckily with some knowledge of french I figured out that the exception must be a sort of permission problem.
A snippet from this weblog finally solved the permission problem.

Before launching eclipse with root user make sure all files in /opt/eclipse are owned by root user:

clebeaupin@atalante:~/tmp$ sudo chown -R root:root /opt/eclipse


Yeah! Now I can start coding... :-) Perhaps this description could help someone who is also struggling with this problem.