Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I updated to Ubuntu 12.04 and now Eclipse does not accept OpenJDK 6 in /usr/lib/jvm anymore. I tried to install openjdk 7 and it did create two folders in /usr/lib/jvm, but neither is accepted by the Eclipse JDK dialog.

Edit: I am referring the the JDK that is used to compile and execute the written programs. Not the JRE used to run eclipse. This especially means that using the proprietary JDK is not an option for me.

share|improve this question
add comment

3 Answers 3

Like maxym said, it's a good idea to install the sun jdk for use with eclipse. You can find a detailed answer to that here.

share|improve this answer
add comment

Dont use the JDK shipped with ubuntu. Eclipse is much more stable with the certified jre - it the sun's one.

  1. Go to java.com and download jre-6u31-linux-x64.bin (or i386 version, depends on you OS version.
  2. execute than file (it's a self extracting archive). It'll create the folder jre1.6.0_31
  3. In you eclipse installation edit the file eclipse.ini and add

    -vm

    /path_where_you_extracted/jre1.6.0_31/bin/java

This two lines whould be added before -vmargs It's important!

It should work now.

share|improve this answer
add comment

Please retry selecting one of the sub directories, e.g. /usr/lib/jvm/java-6-openjdk-amd64. There seems to be a bug in the preferences dialog, as I also experienced that the same path was rejected the first time, but accepted the next time.

It may have to do with whether you try to input the path into the text field or if you use the directory chooser.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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