Reputation: 16524
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 :
So after some researches I got these conclusions:
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?
Upvotes: 137
Views: 192166
Reputation: 33
The OTN license is like a free trial for Oracle’s Java software.You can use it for development, testing, and learning. But it’s not allowed for production (like a finished product) without a purchase.
The NFTC license is like getting the Oracle’s Java software and using it for real work. You can use it for business operations in production, even if you’re making money. But you still can’t sell the Oracle’s Java software itself (no charging others for it) as your own.
NOTE Oracle will use the NFTC 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 as JDK 18 will be available for their entire planned six months support life under the NFTC.
Reference: https://www.oracle.com/in/java/technologies/javase/jdk-faqs.html
Upvotes: 0
Reputation: 16524
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
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
It's really just there to protect Oracle's intellectual property and to shield them from being sued when bugs are found.
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
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
Here I will list and keep updated the official links, ready to download the most used java versions
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.
Just Java SE 8 JDK 8u202 and earlier versions are free for development and production deployment. You can download it from:
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/
apt-get update
apt-get install openjdk-11-jdk
The following implementations, listed in alphabetical order, are open source and free to use:
You should pay for these versions but in return you will have a lot of features suported by Oracle or another third parties
https://www.oracle.com/java/technologies/downloads/
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
There are also other private or commercial implementations:
Source: https://www.baeldung.com/oracle-jdk-vs-openjdk
Upvotes: 58
Reputation: 72854
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 OpenJDK releases are under GNU GPL v2 with the Classpath Exception (permits free production use).
Oracle JDK 17 and later is available under the Oracle No-Fee Terms and Conditions License which permits free use for all users.
Previous Oracle JDK releases remain under the OTN License Agreement for Java SE.
"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
Upvotes: 6
Reputation: 338775
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.
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.
Or another way to view this: Your particular motivations or situation.
Upvotes: 103
Reputation: 49
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.
Upvotes: 1
Reputation: 3392
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:
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.
Upvotes: 49