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've seen many articles about HOW to install Java. My question is WHICH one should I install for Java development? OpenJDK 6, OpenJDK 7, Oracle Java 6, or Oracle Java 7? Some sites tell me to install Oracle Java 6 AND 7, some say just 7. So, what are the advantages and disadvantages of them both?

share|improve this question
up vote 5 down vote accepted

It clearly depends on which Java version you might want to develop on. Please see this link for the differences between Java 6 and Java 7. Some sites suggest java 6 because it is considered to be more stable than 7. Please note that anything you can do with java version 6, you can do with 7 too.

If I were in your shoes, I would use the OpenJDK 7, but be sure to download the SDK and not the runtime if you want to be able to do software development with. I do not know if it is 100% compliant with the Oracle version of Java, however it should be enough to cover most developer's needs.

share|improve this answer
+1 for distinguishing between the SDK and the runtime. – Aaron Aug 25 '12 at 19:02
When I do sudo apt-cache search OpenJDK it returns only OpenJDK-7-JDK. Is that what I'm looking for? I understand that the JRE is only for using Java applications (Java Runtime Environment) but by SDK you mean Java Development Kit, correct? – umop aplsdn Aug 26 '12 at 0:49
Exactly. The JDK is what you need in your case. – NlightNFotis Aug 26 '12 at 5:37

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.