9

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?

6 Answers 6

6

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...

1
  • 1
    Just a quick correction - For Java 7, the reference implementation is OpenJDK, not Oracle JDK. And yes, IBM does have implementations for all major platform's except for oracle (sun's) Solraris.
    – intelekt
    Sep 4, 2014 at 11:41
2

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

And read more here: https://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/

1

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

1

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.

0

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.

0

FWIW, I've had fewer problems with Oracle/Sun Java than any other version. OpenJDK works most of the time. I've never gotten GNU Java to work. IBM Java seems good, but I don't have much experience with it.

WebUpd8te has a PPA that makes installation via apt-get easy. Unless you have a reason to use a different version, such as licensing, I'd go with Oracle Java.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .