Why most of the industry is still on Java 8?
Which free version of Java can I use for production environments and or commercial purposes? - Stack Overflow
New versions of Java always coming out but all my apps continue to run in Java 8?
Java Versions and Compatibility - Stack Overflow
Videos
With Java 24 on the corner, most of the larger organizations still use Java 8. Does it not make sense to upgrade java versions and give new features some rest. This would also solve many security issues.
Update 2021-09
- For versions 8 through 16, Oracle required a fee if their own Oracle JDK product was used in production, but not for dev, test, and training usages.
- For Java 17, the Oracle JDK product is available under a new No-Fee Terms and Conditions license, discussed on the Oracle company blog.
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.
Or another way to view this: Your particular motivations or situation.
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 implementation of the Java SE Specification and it is maintained by Oracle.
More details: https://whichjdk.com
Source code can be found here: https://github.com/openjdk
Binary can be found here: https://jdk.java.net/archive
Just select the latest or an specific version and download it. Check this example.
#2 JDK Customized by Third Parties
- Amazon Corretto
- https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html
- Zulu
- https://www.azul.com/downloads/zulu-community/?architecture=x86-64-bit&package=jdk
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!!
- Oracle downloads:
- https://www.oracle.com/java/technologies/java-archive-javase-v14-downloads.html
- https://www.oracle.com/java/technologies/java-archive-javase5-downloads.html
- https://www.oracle.com/java/technologies/javase-java-archive-javase6-downloads.html
- https://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html
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:
- https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html
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:
- https://github.com/AdoptOpenJDK/openjdk8-upstream-binaries/releases/download/jdk8u292-b10/OpenJDK8U-jdk_x64_windows_8u292b10.zip
- https://github.com/AdoptOpenJDK/openjdk8-upstream-binaries/releases/download/jdk8u292-b10/OpenJDK8U-jdk_x64_linux_8u292b10.tar.gz
- I can't find the version for osx :(
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
- https://jdk.java.net/java-se-ri/11
- https://github.com/AdoptOpenJDK/openjdk11-binaries/releases
apt-get update
apt-get install openjdk-11-jdk
Openjdk 17
- https://jdk.java.net/java-se-ri/17
Openjdk 19
- https://jdk.java.net/java-se-ri/19
Openjdk 21
- https://jdk.java.net/21/
Free From Trusted Third Parties
Zulu Community (Java 6,7,8,11,13,14,15)
- https://www.azul.com/downloads/zulu-community/?architecture=x86-64-bit&package=jdk
Amazon Corretto (Java 11)
- https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html
Eclipse OpenJ9
- https://www.eclipse.org/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/
- Java 19
- https://www.oracle.com/java/technologies/downloads/#java19
- Java 17
- https://www.oracle.com/java/technologies/downloads/#java17
- Java 11
- https://www.oracle.com/java/technologies/downloads/#java11
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.
- https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html latest update 251
- https://www.oracle.com/java/technologies/javase/javase8u211-later-archive-downloads.html previous updates (241,231,221,212,211)
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
- Oracle Java 9 and 10 has reached end of support.
- https://stackoverflow.com/a/50333498/3957754
More References
Differences between Oracle JDK and OpenJDK
https://whichjdk.com/
https://www.openlogic.com/blog/java-experts-openjdk-vs-oracle-jdk
https://www.oracle.com/technetwork/java/javase/overview/faqs-jsp-136696.html
https://www.oracle.com/downloads/licenses/javase-license1.html
https://openjdk.java.net/projects/jdk8/
https://www.oracle.com/java/technologies/javase/8u-relnotes.html
https://gist.github.com/jrichardsz/83db09163ca9a0db4c9cd4f91cbf0598/
https://jdk.java.net/archive
As Oracle continues to release new versions of Java such as Java 20 & Java 17, why is it that anything I use that is Java-related continues to rely on Java 8? I've been updating Java8 since 2010 I think. Are Java apps forwards compatible? or will we always have to stick to Java 8 until the developers re-write their apps for newer versions?
Later Java runs earlier apps
You said:
JAR files will not open and say that they were made using a more recent version
An implementation of Java will be able to run most any Java app built with earlier versions of Java.
For example…
If you compile your app using Java 8, you will almost certainly be able to run that app with Java 8, Java 9, Java 10, Java 11, and so on, all the way through to today’s Java 25.
This compatibility is one of the highest priorities for the Java team at Oracle, and a large part of Java’s success. Breaking changes have been kept to an absolute minimum. “Move fast and break things” is not their motto, just the opposite.
Going the other direction…
If you compile your app using Java 20, you will not be able to run that app with Java 8, Java 9, Java 10, and through to Java 19. A later version of Java and its compiler will be using features that did not exist in those earlier versions. So, of course, older runtimes cannot execute later apps.
If you compile with 20, you need to run with 20 or later (20, 21, 22, 23, 24, 25+).
Java Release Train
Java 25 is current now in 2024-09.
Java releases arrive on a regular schedule, like a train, every six months, Autumn & Spring. Any feature not yet production-quality gets bumped to the next release, like a passenger missing a train boards the next one.
LTS
Versions 8, 11, 17, 21, & 25 are designated as long-term support version. These versions continue to see updates over many years. The other versions in-between receive updates only for several months.
JDK & JRE
You said:
but not the JDK. This appears to be what someone who was not a developer would download.
A Java Runtime Environment (JRE) is an implementation of the Java SE specifications, a complete Java platform, with all the software you need to execute an app written in a JVM-compatible programming language such as the Java programming language, Groovy, Scala, and more.
This JRE software consists primarily of a Java virtual machine (JVM) which executes the Java bytecode of a JVM-based app, and adapts that app to the host operating system. A JRE also provides an implementation of the standard Java class libraries. And you get a few tools: jfr, jrunscript, jwebserver, keytool, rmiregistry (docs).
A Java Development Kit (JDK) is a JRE plus tools necessary to write Java apps. These tools include a compiler, a debugger, a profiler, a Javadoc (documentation) processor, and more.
So:
- For you to write a Java app, you need a JDK.
- For your customers to run your app, they need a JRE.
| JRE | JDK |
|---|---|
| Runtime engine: JVM, classes, & tools | Developer kit: JRE + compiler + more tools |
Both JDKs & JREs can be obtained from any of several vendors listed below.
Rolling compatibility
An app compiled for a lower numbered version of Java can be run on the same or higher numbered version of Java. (Unless using a feature later removed, a rare occurrence with Java.)
So yes, an app built for Java 8 can run on Java versions 8, 9, … 17, 18, 19, and 20. But not the other way round. An app built for Java 18 can only be run on Java versions 18, 19, and 20.
JDK vendors
You can obtain a JDK or JRE from any of several vendors.
These vendors include, in no particular order:
- Amazon
- Adoptium (the Eclipse Foundation)
- SAP
- BellSoft
- Microsoft
- Azul Systems
- Oracle
- Red Hat
- IBM
… and more.
If you have no reason to choose a particular vendor, then I suggest starting with Adoptium, a joint effort across the Java community.
Be sure to study the vendor’s legal licensing terms.
Tip: One very convenient way to obtain a JDK/JRE product from a subset of those vendors is by using SDKMAN!, a simple console app.
Every JDK release is production-quality
You said:
JDK 20, which I see has some features in testing
Any feature available by default in Java 20 (or any version) is entirely ready for production use. Each release from any of the JDK vendors has gone through extensive testing.
Any feature not ready for production, because the details may change, is marked as either incubating or preview. These features are never available to you by default. So you cannot use them unwittingly. You have to go out of your way to activate such features. Note that such features are complete in that they have been fully built and tested — they are not “half-baked”. So these features can be used if you so choose, but come with the caveat that they may change or even be withdrawn in the next version.
So understand:
- Every new release of every JDK version is fully ready for production use.
- Java 20 was fully ready for production use.
(Java 20 no longer received updates a few months after the successive version 21 shipped.)
Every JDK is an implementation of Java SE spec
You said:
What is the JDK to Java SE equivalence?
Java SE is a set of specifications published by Oracle Corp.
”Java” (and ”Java SE”) is a trademark owned by Oracle Corp. Available for use only with permission by Oracle.
A JDK is an implementation of the Java specs, plus a compiler and other tools for development and administration.
Some JDK products use the trademark “Java”, but only if permitted by Oracle.
OpenJDK is an open-source project developing a codebase for implementing Java across several chip architectures and operating systems. Many companies and individuals contribute. These include Oracle, IBM, Apple, and others. Many JDK products are based largely, if not entirely, on the OpenJDK codebase.
The term “OpenJDK” may be confusing. Oracle permits any JDK vendor to use the term within the name of their JDK product. Some vendors do, and some do not. Just be clear that the OpenJDK project produces only source code and early-access builds, not finalized binaries or installers . To obtain finalized binaries or installers, choose a vendor from the list seen above.
Java spec number = JDK number
You asked:
What is the JDK to Java SE equivalence?
Every generation of Java specifications use the same numbering as their implementations found in various JDK/JRE products.
So Java 24 specs are implemented by JDK/JRE products numbered 24. Java 25 specs are implemented by JDK/JRE products numbered 25. Sensible and orderly.
More info
For more details, see the whitepaper Java Is Still Free written by pillars of the Java community.
"I googled and downloaded the most recent version of Java, version 8u361"
That is NOT the most recent version of Java. You presumably looked at https://java.com/en which is entitled "Get Java for desktop applications". Look here instead: https://oracle.com/au/java/technologies/downloads.
Since Java 9, Oracle's position is that it is the developer's responsibility1 to provide the JRE or JDK for running any desktop applications that they develop and distribute. See Oracle’s white paper, Java Client Roadmap Update, 2020-05.
So you won't find Oracle or OpenJDK badged JREs for Java after Java 8. For post-Java 8, your options are:
- Instruct your users on how to install an Oracle or OpenJDK JDK.
- Instruct your users on how to install a 3rd-party JRE.
- Use a 3rd-party installer generator to create an installer with an embedded JRE (obtained from a 3rd party) or JDK.
- Use
jlinkto create a custom JRE for your application. - For Java 14 and later, use
jpackageto create a native executable for your application.
But to answer your question Java SE 8 (aka JDK 1.82) is 8uxxx, Java SE 9 is 9uxxx, Java SE 10 is 10uxxx and so on. There is no mystery to the compatibility / equivalency.
1 - Oracle don't want to (unfairly) cop the blame for out-of-date / insecure Java installations dropped by application installers. And the don't want to (unfairly) cop the blame when an official Java patch release installed by the user causes an application to stop working. Dealing with these things is now 100% your responsibility as the app developer / distributor.
2 - The Java 1.N versus Java N stuff is engineering vs marketing nonsense that started back in the early 2000's. Don't be fooled. And for more information about Java versions, see the Wikipedia Java Version History page.)
This is likely to be a really dumb question, but why are there constantly new major versions of Java being released, but everything we need Java for in our infrastructure continues to use Java 8? I remember when Java 9 and 10 came out and I thought we would be moving to those versions. But here we are in 2021, and all our Java dependent software still comes bundled with the latest Java 8 version. Even my daughter's Minecraft software still uses Java 8, right? I just saw Java 16 being published on Oracle's website. What am I missing about all of this?
Because they switched to a new release model which allows for them to get new features out faster.
Same thing happened when Firefox and chrome switched to a timed release model. People bitched about version numbers but slowly got use to the fact that "I don't really care that this is firefox 82".
From an organization standpoint, this has been great for the Java getting features out. It used to be that they'd say "Ok, we are going to target key feature X for java Y". The problem with that is nearly all project development got devoted to that feature and ultimately "when" java would go out was completely unknown. Further, releases where crazy times for JDK developers.
With the new model, they've been able to work on a lot more features in parallel. A ton of usability features made it in (records, pattern matching, string literals) which never would have made it in the old model. Further, it's allowed them to slowly walk in huge features (Valhalla, loom, etc) making pre-emptive changes needed to support massive changes in the future.
Post Java 9, the upgrades have been a breeze. Honestly, I almost wish they'd move to an even faster release model to really force people to stop caring so much about these version numbers. Rust does a release every 6 weeks and I think that works great. Nobody cares that it's now Rust 1.50 or whatever.
What am I missing about all of this?
Well you are missing out on a lot;
-
Lots of JVM (HotSpot) enhancements
-
Updates to the Streams API
-
Records
-
Text Blocks
-
Switch expressions
-
Pattern matching for instanceof
-
var
Just to name a few, but it's really small list compared to all that has been added since 8, you can see all the additions here.
Upgrading infrastructure can be difficult and time consuming. There was also a lot of FUD related to the Module System which was a part of Java 9. Have a hard time imaging any meaningfully popular tool or frameworks which doesn't support Java 11, which keep in mind it has been out for nearly three years now, and many tools and frameworks release support for the most current version of Java right around it's release.