Hacker News new | ask | show | jobs
by thom_nic 2767 days ago
I have not used Java in many years now, but I'm curious if anyone has anecdotal experience using OpenJDK in production? Performance vs Oracle Java, bugs/ idiosyncrasies due to internal API differences, etc?
6 comments

We've been using OpenJDK in production since Java 7 without issue. Since Java 8, Oracle JDK has been built from OpenJDK with a couple of proprietary editions (Java Flight Recorder, SNMP support, different font rendering etc.).

In practice, none of the differences had any impact on our uses.

Since Java 11, Oracle JDK and OpenJDK are the same. Oracle JDK is just a build that's commercially supported by Oracle.

There's a ton of FUD around OpenJDK and has been for years. For a long time many Apache projects recommended Oracle JDK solely on the grounds that they hadn't been tested on OpenJDK by the maintainers.

As of JDK 11, there is feature parity between OpenJDK and Oracle JDK, which is the JDK that most people used until now. In JDK 8, the Oracle version had several closed source additional features (such as Java Flight Recorder and the Z garbage collector). Also, implementations of things like graphics rendering used to be different in Oracle JDK 8 and earlier. That's no longer the case. Oracle JDK and OpenJDK should be drop-in replacements for each other as of JDK 11.
Amazon's OpenJDK is 1.8.0 which is JDK8, so it still 'misses' those Oracle's closed features?
Most of those features are only relevant for UI stuff and even then you are unlikely to notice the difference since openjdk would include implementations of anything even remotely relevant. Unless you know you need this, you can safely assume you don't.

Here's a good stackoverflow post on the topic (note this is about openjdk 7). Things have only improved since then.

https://stackoverflow.com/questions/11547458/what-is-the-dif...

If you are doing any kind of server side deployment, openjdk has been a drop in replacement since the java 7 days. Essentially all linux distributions include it and you have to jump through hoops to get the oracle version.

There are differences between different openjdk builds though. I've ran into issues with certificates a couple of times on Ubuntu. Also they had a strange notion of what is stable and what is not early in the life of java 8. Another issue is the licensing of the test suite. This makes it hard to test your builds. The words certified build, implies that the produced build passes the licensed test suite.

Correct. But the chances that you're using any of those features is extremely low.

Most of the differences are commercial features you're not allowed to use without a commercial support contract with Oracle. The only other differences are so small you probably wouldn't notice.

James Gosling, says that Amazon uses Corretto in production...which is OpenJDK. So most of AWS/Amazon uses that.
In our spot tests, we have not seen any performance difference or idiosyncratic behavior. Today, their differences seem more about licensing and support, and less about technology.
Opening this up to the world should be not so subtle hint to answer your question with real world experience.
Used OpenJDK in production for years. Never seen any issues or bugs. And with the changes in the OracleJDK license going forward we are essentially forced to use OpenJDK.