Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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

  1. Go to 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



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

It should work now.

share|improve this answer

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

Your Answer


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.