Using Java 11 In Production: Important Things To Know
If you are thinking about updating to the latest version of Java, check out this post to learn the most important info about Oracle's Java 11 release.
Join the DZone community and get the full member experience.Join For Free
If you stay up to date on news from the Java community, you may have heard that Oracle changed their support model for Java. Some rumors even suggest that we now have to pay to use Java — this is not true!
This topic is quite a complex one since there are a number of overlapping changes that have come together since the release of Java 8. The new, six-monthly release cadence and Oracle's changes in licensing and support model mean that any organization that deploys a Java application should take this opportunity to look at:
- Where they get their JDK from (e.g. Azul, IBM, Oracle, Red Hat, or other OpenJDK build)
- Which versions of Java they use in production
- Whether or not they expect to get updates (e.g. patches and security fixes) for these versions of Java
- Which versions they want to use in the future
- How frequently they want to update their version of Java (i.e. to the next major version)
- What sort of support (i.e. triage and bug reports) they expect for their version
This warning is on the download page for Oracle’s commercial JDK – don’t ignore it!
Changes to the Oracle JDK
In the past, many of us simply downloaded Oracle's JDK and used this in development, in testing, and in production. From Java 11, Oracle has changed the license of their JDK, so instead of having a single JDK build, which can be used either commercially (i.e. with paid support) or for free (which many of us were doing), they now have two different JDK builds:
- Oracle's JDK (commercial) — you can use this in development and testing for free, but if you use it in production, you have to pay for it
- Oracle's OpenJDK (open source) — you can use this for free in any environment, like any open source library.
Note that since Java 11, Oracle's commercial JDK and Oracle's OpenJDK builds are functionally the same. So, we should be able to run our applications on either, without having to make any changes or losing any features.
Support and Updates
There's an important difference between these two builds though — if you're using Oracle's commercial JDK, you'll get updates and support. If you're using Oracle's OpenJDK build, Oracle won't be providing updates to past versions. What this means is that now Java 11 is out and Oracle will no longer be updating their OpenJDK builds for 10 or 9. So, if you're using Oracle's OpenJDK build, you should be prepared to update to each new version of Java as it comes out (or run an older version that won't get updates).
Having said that, Oracle is not the only vendor in this game. For years, we've been used to using their JDK for free, and so, it has generally been our default, but there are other vendors who provide JDKs, and they have different support models (free and paid for) and different attitudes towards providing updates for different versions of Java. Some of these other vendors, for example, may continue to provide updates and/or support for Java 9 (which Oracle will not).
Stephen Colebourne has written a post summarizing the different JDK builds from the different vendors and explaining how (and why) all these vendors provide different builds based on the same code (i.e. OpenJDK).
If you don't want to use either of the Oracle JDK builds (for example if their support or updates policies doesn't suit you), investigate what Azul, IBM, Red Hat, and the community-led AdoptOpenJDK have to offer instead.
This summary is something I wrote in September's Annotated Monthly, updated to reflect the release of Java 11:
- You can still download the commercial Oracle JDK for free and use it for free in development/test environments.
- Oracle's JDK 8 will no longer receive public updates after January 2019. If you want to receive updates to Java 8, you may need to pay Oracle or to find another JDK build.
- As of Java 11, OpenJDK has feature parity with Oracle's JDK, so if you want to use a free JDK, use OpenJDK. You can download Oracle's OpenJDK 11 build or builds from the community-led AdoptOpenJDK.
- The ongoing support and updates for "older" versions of Java (including 9 and 10) have changed since the introduction of the six-monthly release cycle.
- For Oracle's commercially-licensed JDK, Java 9 and Java 10 are no longer updated or supported. If you're currently using Oracle's JDK, you need to look at which version(s) you're using and which versions you want to use going forward, and you need to understand Oracle's support model (and prices) if you want to use it in production.
- If using OpenJDK, you may need to upgrade to the latest version as soon as it's available, depending upon which vendor's build you're using. This advice applies to pretty much any free, open-source library or framework.
- Other vendors may offer support for Java 9 or other versions.
- If you want full support or updates for the version of Java you're running in production, you should compare and contrast the support models and prices of Azul, IBM, Oracle, and Red Hat. Note that these companies always had free and paid for services and support, so none of this is really new.
- Java is Still Free (Java Champions) — if you only read one more article, it should be this document. It’s an in-depth look at this topic from the Java Champions, a group of independent experts (full disclosure: the author of this blog post is also a Java Champion). The document has also been checked by representatives from the major vendors so you can be confident that the information is correct. It’s also available in Spanish.
- A Quick Summary on the new Java SE Subscription (Oracle)
- Oracle JDK Releases for Java 11 and Later (Oracle)
- The future of Java and OpenJDK updates without Oracle support (Red Hat)
- Eliminating Java Update Confusion (Azul)
- Java is still available at zero-cost (Stephen Colebourne)
- The Future of Java / OpenJDK and How it Impacts You! (Video: Virtual Java User Group)
Published at DZone with permission of Trisha Gee, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
How to Submit a Post to DZone
DZone's Article Submission Guidelines
Auditing Tools for Kubernetes
Extending Java APIs: Add Missing Features Without the Hassle