Technically what is the main difference between Oracle JDK and OpenJDK? [duplicate]

I have been using OpenJDK for ages, initially for small projects where it has no problems. But since I started to play with it for big toys, I started to notice random/unknown fatal error and crashes (with H.264 codecs, etc.), and it was a nightmare till then to get ride of system crash+fatal errors caused by OpenJDK.

After getting completely frustrated and tired with OpenJDK, I finally decided to switch into Oracle JDK 7. Since then my fatal errors/crashes were gone. I am still doing trace to see if it occurs, but I never got those system crashes yet.

Now I am wondering, if OpenJDK is only a license issue, why is stability impossible with it?

Why does OpenJDK keep bugs alive, inside their stable releases, but claiming that its clone of Oracle JDK (which it is not really), then what really technically separates OpenJDK from Oracle JDK? (only quick features availability? Or focused on stability/reliability?)


Solution 1:

Technical differences are a consequence of the goal of each one (OpenJDK is meant to be the reference implementation, open to the community, while Oracle is meant to be a commercial one)

They both have "almost" the same code of the classes in the Java API; but the code for the virtual machine itself is actually different, and when it comes to libraries, OpenJDK tends to use open libraries while Oracle tends to use closed ones; for instance, the font library.

Solution 2:

OpenJDK is a reference model and open source, while Oracle JDK is an implementation of the OpenJDK and is not open source. Oracle JDK is more stable than OpenJDK.

OpenJDK is released under GPL v2 license whereas Oracle JDK is licensed under Oracle Binary Code License Agreement.

OpenJDK and Oracle JDK have almost the same code, but Oracle JDK has more classes and some bugs fixed.

So if you want to develop enterprise/commercial software I would suggest to go for Oracle JDK, as it is thoroughly tested and stable.

I have faced lot of problems with application crashes using OpenJDK, which are fixed just by switching to Oracle JDK