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 want to install Java on my computer so that I can develop programs and I came across this page on Java in the Ubuntu community documentation. It says:

Java is a technology from Oracle (formerly: Sun Microsystems). There are several implementations, of which five will be discussed here:

  • OpenJDK: The primary goal of the OpenJDK project is to produce an open-source implementation of the Java SE Platform (6 and 7). This is the default version of Java that Ubuntu uses and is the easiest to install.
  • Oracle (Sun) Java 6: Oracle (Sun) Java 6 is the reference implementation for Java 6.
  • Oracle Java 7: Oracle Java 7 is the reference implementation for Java 7.
  • IBM Java: IBM Java is the preferred Java solution on PowerPC machines. It is a reimplementation with a Just-In-Time Compiler. It is only available from IBM's website.
  • GNU Compiler: A Java compiler made by GNU. Only developers should have to install this.

I read the contents but still am a little confused. Are they all different versions of JDK? If not, then what?

And which one would you prefer?

share|improve this question
add comment

5 Answers 5

up vote 2 down vote accepted

Are they all different versions of JDK? If not, then what?

They are different implementations of Java/development kits for Java (JDK). Java is a standard platform, and all of these implement that platform in their own way. Of these:

  • OpenJDK and GNU Compiler are the only ones that are open source. I usually prefer them -- the ease of installation (apt-get or Software Center) is a big factor.
    • OpenJDK in particular is derived mostly from the "official" Java source code that Oracle/Sun open sourced; it is backed by Oracle.
  • Oracle Java 6 and 7 are "the" Java, if you will, from the company that invented Java (that was Sun, but Oracle bought them a while back). That's why they are called reference implementations. You may want to use them if you are using Oracle JDK on another platform too, or if OpenJDK is giving you problems.
    • The 6 and 7 refer to versions of the language/platform. 7 is newer and has more features, but has been tested less; 6 is extremely mature and stable. I'd prefer 6 if you are just starting out.
  • Contrary to the wiki, IBM makes JDKs/JREs for all platforms, although theirs might be the only one for the PowerPC.

If you are starting out in programming, almost any of these will be a good fit. Go for OpenJDK just because its easy to install.

The only experience I have in differentiating these is compiling in a low-resource environment (128-192MB RAM - a VPS); I found Oracle Java 6 JDK worked best for one program (i.e succeeded) and IBM Java 6 JDK for another...

share|improve this answer
add comment

Java Language and Runtime Environment is a specification. All this packages are different implementations of the same specification.

And read more here: http://stackoverflow.com/questions/1977238/why-should-i-use-the-oracle-jdk-over-the-openjdk-or-vice-versa

Usually you just should use openJDK as it works just as fine as Oracles JDK but is open source, so you don't have any issues with licences. More info at http://openjdk.java.net/

share|improve this answer
add comment

It explains what each one is on the page but essentially they are all Orcale's java just developed by different groups.

  • OpenJDK is the open source development of Oracles Java edition.
  • Java 6 and 7 are just versions of Oracles Java standard edition. & is the most up to date and released last year in June or July I think.
  • The IBM version was mainly used for PowerPCs as its states probably wont matter much to you unless you have a PowerPC processor.
  • The GNU compiler is for developers that are coding in Java. Its just a compiler for java. If you don't know what this one is then you probably don't need it unless you are wanting to learn about Java development.

I use OpenJDK because it works better with Minecraft. No other reason ha.

Bill

share|improve this answer
add comment

As far as I know,openJDK is almost the same as Sun JDK, the main difference is that it is open source.You cannot use a IBM JDK if you are an PC user since it is restricted on PowerPC.The gcj is not considered a good choice for me since it seems still immature.

share|improve this answer
add comment

This will probably anger many of the more FLOSS folks but here's my short answer.

Oracle acquired Sun, Oracle (Sun) Java 6 is just the older version of Oracle Java 7. That being said.. Unless you have a really good reason not to use Oracle's version. Everything else is an attempt to replicate that Oracle has done and none of them are as good.

As far as break down on the quality. GNU Java is the worst attempt of the JVM I've ever seen.. unless you enjoy frequent crashes.. don't use it. IBM Java -- never used it honestly, so no opinion OpenJDK -- if you're going to use an open source implementation of the JVM I would use OpenJDK and use the 7.x version.

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.