What is the difference between the five versions of Java on this page for Ubuntu?
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?
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...
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/
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