Due to a lot of minor errors with the eclipse from the repository( cannot install mylyn or pydev due to unmet dependencies) I manually downloaded from eclipse.org.

I have not had this problem before but when I go to ~/eclipse (where I extracted the zip) and try to run eclipse it will not run. From the command line I just get eclipse not installed use sudo apt-get to install it.

I know I have java installed.

sayth@sayth-TravelMate-5740G:~$ java -version
java version "1.6.0_23"
OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre10-0ubuntu5)
OpenJDK Server VM (build 20.0-b11, mixed mode)

how can I get eclipse to load normally?


I removed the openjdk and installed oracle java to /usr/java I then create a symbolic link sayth@sayth-TravelMate-5740G:~/eclipse$ sudo ln -s /usr/java ~/eclipse/jre

However still the error.

sayth@sayth-TravelMate-5740G:~/eclipse$ java eclipse.jar
Exception in thread "main" java.lang.NoClassDefFoundError: eclipse/jar
Caused by: java.lang.ClassNotFoundException: eclipse.jar
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: eclipse.jar. Program will exit.
  • please run this eclipse from command line and post the output – coder Nov 13 '11 at 7:11

Do this thing

1. get a JAVA RUN ENVIRONMENT (jre) extract it and put it in the eclipse folder

2. Or simply make a link to the to your system's jre and put it in the eclipse folder

make sure that name the folder or link jre

  • it didn't quite work for me. I was trying option 2. sayth@sayth-TravelMate-5740G:~$ which java /usr/bin/java so then I did ln -s /usr/bin/java ~/eclipse/jre but it still isn't loading – sayth Nov 13 '11 at 9:14

I came to realise that the error is caused by using the 64bit eclipse download. Neither the openjdk in repo's or the java I installed from oracle were 64 bit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.