117

While I was in a dockerization project in my current job, I got this doubt: Which Java can I use?

This doubt is due to :

java download alert

So after some researches I got these conclusions:

  • Since the Java 8 update at April 16, 2019 8u221, all versions and updates for (Java 8, 9, 10, 11 and 13) has no cost just for personal use and development purposes. Any other use, needs a Commercial License
  • Legacy versions prior to 7, does not have and will not have any update. Maybe a sales contact could be a solution if an update in these versions are required for Legacy Systems Support.
  • If I want to use Java 8 oracle version for commercials purposes and FREE, I need to use a previous version of April 16, 2019 8u221 update

Questions

According to my conclusions:

  • If my development strictly needs or was developed with JDK 8, Can I only use Oracle Java SE 8 JDK 8u202 and earlier versions for FREE and commercial purposes accepting issues and security problems?

  • If I can change my development and I want still FREE, and I want to have improvements and security updates, I must use one of these java open implementations?


References

The Student
  • 27,520
  • 68
  • 161
  • 264
JRichardsz
  • 14,356
  • 6
  • 59
  • 94
  • 3
    Here is a good video explaining this: https://www.youtube.com/watch?v=eBuFzQeiGe0 – AntikM Oct 05 '19 at 17:46
  • Thank you for the JDK 8 download link (unsupported but free version). That's what I was looking for. – Jarekczek Dec 18 '19 at 11:09
  • 1
    "Oracle provides JDK 17 builds under yet another license: oracle.com/downloads/licenses/no-fee-license.html Does this change anything substantially?" -- It may be game changer for Oracle customers. I will stick to https://adoptium.net/ (adoptjdk new home) – Jayan Sep 15 '21 at 13:18
  • @joachim-sauer, too many lawyer terms in oracle.com/downloads/licenses/no-fee-license.html :S. I think these are some vital parts to understand this new oracle ad: just for internal business operations, only if there is express authorization of such use by Oracle. On another hand, according to the #sunny answer, just the 17 version could be used in production. – JRichardsz Sep 16 '21 at 14:27
  • 2
    @JRichardsz: yes, that is my problem as well. It's why I'm not taking the "it's free now" message at face value and would like an answer who actually knows about licenses and can parse that into plain English. For the time being I'll definitely treat that license as "tainted" i.e. won't use Oracle JDK. – Joachim Sauer Sep 16 '21 at 14:52
  • The only person who you should rely on to correctly to interpret legal terms for you is someone who is a qualified lawyer. You most likely won't find one here, and you most likely won't find one who does license interpretation for free. If this matters to you, pay for proper legal advice. – Stephen C Jul 26 '22 at 07:46

5 Answers5

94

Update 2021-09

On my first reading, it appears this new license makes production use free-of-cost (along with dev, test, and training usages), except for products sold for a fee while bundling the Oracle JDK product. But I am not an attorney, so read the terms yourself and consult legal advice as needed.

Keep in mind that many other vendors continue to provide implementations of the Java specs, as shown in the flowchart below. Some of these vendors sell support plans, either optionally or as a requirement for use of their product. Never assume, always read the detailed requirements for any distribution you obtain.

Another 2021 update: Add Microsoft to the list of vendors seen below.


Several vendors offer a choice of Java implementations

The Answer by Speakjava is correct and informative.

In addition, here is a flowchart I made to guide you in choosing a vendor for a Java implementation.

Flowchart guiding you in choosing a vendor for a Java 11 implementation

Or another way to view this: Your particular motivations or situation.

Motivations in choosing a vendor for Java

Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
  • Thank you so much for your time. I think it will be grateful , point to **free** options from 7 to java 11, because the goal of this question is a quickly help for users or organizations who search a **free of cost** technology. Can you share us an editable version of your diagram? I can edit it. – JRichardsz Oct 16 '19 at 20:07
  • @JRichardsz The graphics was done using OmniGraffle for macOS. – Basil Bourque Oct 16 '19 at 20:27
  • @JRichardsz As for free-of-cost, follow the **vertical line on the right of the diagram**. All items on right side of the blue barrel are all free-of-cost. On the left-side of the blue barrel, the *Oracle JDK* is definitely fee-required for production-use, and possibly *Pivotal OpenJDK* may be free-of-cost (I am not sure from reading their material). Both *Zulu* by Azul Systems and *Liberica* from BellSoft were free-of-cost when I read their marketing materials. Of course you must verify the license for yourself when obtaining a product. So, 6-7 free-of-cost vendors are shown here. – Basil Bourque Oct 16 '19 at 20:29
  • 1
    @JRichardsz General advice: When you have no particular criteria for choosing a vendor of Java, and you know for certain you do not want to buy support, **➠ just go with https://AdoptOpenJDK.net**. If you know you will deploy to Amazon Web Services cloud, use Corretto. If you want to purchase support, choose from the left-side of the blue barrel. If you need a special JVM, use *Zing*. – Basil Bourque Oct 16 '19 at 20:33
  • So according to this diagram I can use any version of JDK on my work laptop for development, as long as I am not using it for production deployment, is that correct? – Yar Jul 09 '21 at 15:55
  • 3
    @Yar No, incorrect. Read the flowchart more carefully. The products on the right side of the blue barrel are free-of-cost. Products on the left side of the blue barrel vary in their terms, and may have restrictions, and may or may not require a fee. Ex: I believe Azul Systems requires a fee for their Zulu product for both development and deployment but require no fee for their Zing product (whose name has changed recently by the way). IMPORTANT: In the end, you must investigate the license terms of the product yourself rather than trust some fool on the internet with a flowchart drawing tool. – Basil Bourque Jul 09 '21 at 16:17
  • 1
    Just to emphasize what Basil said: **IMPORTANT: In the end, you must investigate the (current) license terms of the product yourself rather than trust someone on the internet with a flowchart drawing tool.** – Stephen C Sep 12 '21 at 23:17
  • Do the new [Non-Fee T&C](https://www.oracle.com/downloads/licenses/no-fee-license.html) for Java 17 provide a relevant change tho this answer? – Joachim Sauer Sep 15 '21 at 12:07
  • 2
    @JoachimSauer Yes, indeed it does. So noted with an update prepended to the Answer. Thank you. – Basil Bourque Sep 21 '21 at 23:28
  • About this statement: _"JRE no longer exists"_ This does not seem to be correct. Adoptium for example [distribute JRE:s](https://adoptium.net/temurin/archive?version=11). You don't have to use jlink to distribute Java without the entire JDK, you can just download the much smaller JRE. Maybe you came to this incorrect conclusion because OpenJDK does not distribute a separate JRE? Please update! – Lii Jul 09 '22 at 09:00
53

Summary

If you need to have java in your production servers for free, your have two options

#1 OpenJdk

The OpenJDK is the open source reference implementation of the Java SE Specification, but it is only the source code https://github.com/openjdk

Binary distributions are provided by different vendors for a number of supported platforms.

One of them is https://jdk.java.net/java-se-ri/19 which is maintained by Oracle:

Source: https://whichjdk.com

#2 JDK Customized by Third Parties



Licences OTN vs BCL

Oracle JDK 8 (aka 1.8) no longer uses BCL (Binary Code License). From April 16, 2019, Oracle JDK 8 uses the OTN (Oracle Technology Network) license, which requires you to create an Oracle account to download JDK 8 and payment!!

BCL = Oracle Binary Code License

  • You can use it, but you can't modify it
  • You agree not to sue Oracle if anything goes wrong
  • You can redistribute/publish it (so that you can sell products with Java embedded), but if you do, you agree to indemnify Oracle; so if someone sues you, you can't drag Oracle into it.

It's really just there to protect Oracle's intellectual property and to shield them from being sued when bugs are found.

source: https://www.quora.com/In-short-what-does-the-Oracle-Binary-Code-License-Agreement-for-Java-SE-actually-say-or-prohibit/answer/Jon-Harley

As a summary: FREE with risks and without any fault of Oracle

OTN = Oracle Technology Network License

As a summary: Opposite to BCL and FREE just for development in your laptop. For enterprises, you must PAY

OpenJDK and Oracle JDK

Both OpenJDK and Oracle JDK are created and maintained currently by Oracle only.

OpenJDK and Oracle JDK are implementations of the same Java specification passed the TCK (Java Technology Certification Kit).

Most of the vendors of JDK are written on top of OpenJDK by doing a few tweaks to [mostly to replace licensed proprietary parts / replace with more high-performance items that only work on specific OS] components without breaking the TCK compatibility.

Source: Differences between Oracle JDK and OpenJDK



Free official options

Here I will list and keep updated the official links, ready to download the most used java versions

Oracle Java 1.4, 5, 6 and 7 (Deprecated)

Oracle does not show any message related to license changes for Java 1.4, 5, 6 and 7 downloads. So we can use them for development and production deployment, accepting issues and security problems because these versions are so ancient!!

Legacy versions prior to 7, does not have and will not have any update. Maybe a sales contact could be a solution if your have a Legacy Systems running over this java old versions.

Oracle Java 8 update 202

Just Java SE 8 JDK 8u202 and earlier versions are free for development and production deployment. You can download it from:

Openjdk 8 (Deprecated)

OpenJDK is a ORACLE initiative. More details here: https://adoptopenjdk.net/

compressed mode

You can download the latest v8 release from here. Latest version:

Follow this to download using curl

install mode

apt-get install openjdk-8-jre (just run apps)
apt-get install openjdk-8-jdk (develop and run)

From https://openjdk.java.net/install/

Openjdk 11

apt-get update
apt-get install openjdk-11-jdk

Openjdk 17

Openjdk 19



Free From Trusted Third Parties

Zulu Community (Java 6,7,8,11,13,14,15)

Amazon Corretto (Java 11)

Eclipse OpenJ9

More third parties

The following implementations, listed in alphabetical order, are open source and free to use:

  • AdoptOpenJDK
  • Azul Zulu
  • Bck2Brwsr
  • CACAO
  • Codename One
  • DoppioJVM
  • GraalVM CE
  • HaikuVM
  • HotSpot
  • Jamiga
  • JamVM
  • Jelatine JVM
  • Jikes RVM (Jikes Research Virtual Machine)
  • JVM.go
  • leJOS
  • Maxine
  • Multi-OS Engine
  • RopeVM
  • uJVM


NON-FREE options

You should pay for these versions but in return you will have a lot of features suported by Oracle or another third parties

Oracle Java

https://www.oracle.com/java/technologies/downloads/

Oracle Java 8 update 221

Since the java 8 update at April 16, 2019 8u221, all versions and updates for (java 8,9,10,11,14) has no cost just for personal use and development purposes. Any other use, needs a Commercial License.

Source: https://www.baeldung.com/oracle-jdk-vs-openjdk

Proprietary Implementations

There are also other private or commercial implementations:

  • Azul Zing JVM
  • CEE-J
  • Excelsior JET (Discontinued)
  • GraalVM EE
  • Imsys AB
  • JamaicaVM (aicas)
  • JBlend (Aplix)
  • MicroJvm (IS2T – Industrial Smart Software Technology)
  • OJVM
  • PTC Perc
  • SAP JVM
  • Waratek CloudVM for Java

Source: https://www.baeldung.com/oracle-jdk-vs-openjdk



Notes



More References

JRichardsz
  • 14,356
  • 6
  • 59
  • 94
48

Oracle made a number of significant changes to how the Java platform is developed, distributed and updated at the same time as the launch of JDK 9.

The key facts to answer your questions are these:

  1. Oracle was using the Oracle Binary Code License (OBCL) for Java. This had field of use restrictions (you needed a commercial license for embedded use) but granted free use of the Oracle JDK for general purpose development and deployment.
  2. As of JDK 11, the license changed to the Oracle Technology Network License Agreement (OTNLA), which requires you to purchase a Java SE Subscription for use in commercial production. This license has also been applied to updates of JDK 8 since April (update 211/212).
  3. As of JDK 11, Oracle eliminated all functional differences between the Oracle JDK and a binary built purely from the OpenJDK source code. The important things no longer in the Oracle JDK 11 are the browser plugin, Java Web Start and JavaFX.
  4. You can continue to use any public Oracle binaries of JDK 7 (and earlier) in production without the need for a Java SE subscription, as the license is still the OBCL (it has not been changed retrospectively). You can also, as you say, use JDK 8 up to update 202 under the OBCL without cost.
  5. There are several options for continuing to use JDK 8 with updates for free. One of those is Zulu Community from Azul (who I work for). This is a free, TCK-tested binary with a couple of additional backported features (TLS 1.3 and Java Flight Recorder). Since this passes the TCK, from a functional perspective, it is identical to the Oracle JDK. Unless you are using Applets or Web Start your applications will work in the same way as with the Oracle JDK.
  6. If you want to move to JDK 11 (the current long-term support release, as defined by Oracle but followed by all other JDK providers), then you will need to choose one of the free distributions (like Zulu Community).

It is highly recommended to ensure your JDK is up to date and contains all relevant security patches. Continuing to use an older version could expose you to significant security exploits.

Speakjava
  • 3,177
  • 13
  • 15
  • 3
    Sorry my delay. As a summary, We can say : #1 From April 16, 2019 8u221 update, the jdk offered by oracle needs a **payment** #2 If we need free 4 ever and free updates, oracle jdk is not an option, just open-jdk, zulu, azul, Corretto are the solution? – JRichardsz Oct 16 '19 at 19:56
  • 2
    @JRichardsz To clarify: Oracle provides **two** Java implementations: (A) *Oracle JDK* is their supported product. Now requires a purchase to use in production. Provided under a non-open-source license. You can find it at https://www.oracle.com/technetwork/java/javase/downloads/index.html . (B) The other product is not formally named. It is found at https://jdk.java.net/. This product is free-of-cost, and is released under the GNU General Public License, version 2, with the Classpath Exception. Apparently a direct build of *OpenJDK* source code. Other vendors provide Java too. – Basil Bourque Jan 02 '20 at 21:23
6

Starting JDK 17 (September 2021)

Oracle JDK 17 and later are provided under a free-to-use license that lasts until one year after the subsequent LTS release. After that time, the Oracle JDK becomes under OTN license.

Here's a related FAQs page that explains more, but here's a summary extracted from that page:

"Oracle will use the NTFC for JDK 17 and later releases. LTS releases, such as JDK 17, will receive updates under this license for one year after the release of the subsequent LTS. After the free use license period, Oracle intends to use the OTN License, the same currently used for Java 8 and 11 LTS releases, for subsequent updates. Non-LTS releases such JDK 18 will be available for their entire planned six months support life under the NFTC."

Sources:

https://blogs.oracle.com/java/post/free-java-license

https://www.oracle.com/uk/java/technologies/javase/jdk-faqs.html

M A
  • 71,713
  • 13
  • 134
  • 174
  • spring, mule and other frameworks needs java since 8 version: https://start.spring.io/. How does your answer help to choose a **free version** of Java for production environments? I think this is the main part in your answer: **After the free use license period, Oracle intends to use the OTN License**. Thanks – JRichardsz Sep 16 '21 at 14:14
  • 1
    @JRichardsz My answer just supplements the existing answers but starting Sept 2021 with the JDK 17 release. As you implied, old releases are not covered by the free-to-use license. – M A Sep 16 '21 at 14:22
  • Please update your quote source to https://www.oracle.com/uk/java/technologies/javase/jdk-faqs.html for clarity. – Tom Gregory Jul 25 '22 at 17:42
1

Now,You can use JDK/Java 17, in JDK/java7 download page(https://www.oracle.com/java/technologies/downloads/) ,you can get this comment:

Java 17 LTS is the latest long-term support release for the Java SE platform. JDK 17 binaries are free to use in production and free to redistribute, at no cost, under the Oracle No-Fee Terms and Conditions License.

JDK 17 will receive updates under these terms, until at least September 2024.

sunny
  • 49
  • 3
  • spring, mule and other frameworks needs java since 8 version: start.spring.io. According to your link, just the 17 version could be used in production. – JRichardsz Sep 16 '21 at 14:28