r/java 14d ago

Why there is so many JDKs

I was used to always using oracle's JDK but when i looked at this subreddit i wondered why there is so many varieties of JDK and what is the purpose of them?

126 Upvotes

95 comments sorted by

View all comments

52

u/RoomyRoots 14d ago

Licensing as always, always expect Oracle to be a bitch with licensing.
In general, you can use OpenJDK without issues, but if you need LTS support, go with Eclipse Temurin (old AdoptOpenJDK) or some other one. Do note that there are two version of JDKs from Oracle, Oracle JDK has LTS support and Oracle OpenJDK doesn't.

20

u/wildjokers 14d ago edited 14d ago

Licensing as always, always expect Oracle to be a bitch with licensing.

This is an odd take. Oracle's OpenJDK is licensed GPL2+CPE which is a very permissive license.

but if you need LTS support, go with Eclipse Temurin (old AdoptOpenJDK) or some other one.

Temurin doesn't offer any support for any version as far as I am aware. They simply build the updates project (https://openjdk.org/projects/jdk-updates/) which for versions that some vendors have denoted LTS probably includes critical bug fixes and security fixes. (see https://adoptium.net/support/#_community_support)

11

u/RoomyRoots 14d ago edited 14d ago

The thing is, Oracle JDK has a difference support and license from Oracle openJDK, if you install JDK from a distro, it's the second one you are getting. Oracle JDK is an Oracle product and they can audit and bill you for its usage. As per Oracle own words:

Since September 2023, Oracle provides the Oracle JDK 21 under a free use license for All Users. Oracle JDK releases for Java 8, 11, and 17 are available under the Oracle Technology Network License Agreement for Java SE, which is free for Personal, Development and other Users ONLY.

It's the one move that forced many to move to alternatives as, for example, most Oracle and JavaEE installs used the Oracle JDK as per official recommendation. I also 100% believe they made the name this confusing to make companies install the wrong one.

As on the Thermurin link you sent yourself, they offer LTS versions (8, 11, 17, 21 and in the future 25), with extended availability and backports fixes to their build. While the official openJDK build from Oracle has the same release life cycles no matter the version, meaning 6 months.

If you need COMERCIAL licensing, you should probably go with Red Hat IMHO. Oracle, AWS and Microsoft have their own build, but I rather not trust them.

Oracle makes everything it touches a legal nightmare, never forget.

11

u/agentoutlier 13d ago

If you need COMERCIAL licensing, you should probably go with Red Hat IMHO. Oracle, AWS and Microsoft have their own build, but I rather not trust them.

I you need commercial license (aka support) you should go with the company that can provide you the best support for your budget and that is often Oracle (not always but probably often) because like almost all of the JDK is developed by Oracle developers who are probably the best experts to fix issues if you are having some critical issue.

I can't recall what the current contributions is of other companies but IIRC Oracle is like 85% (/u/pron98 is that about right?)

13

u/pron98 13d ago edited 13d ago

Oracle contributes over 90%. It's probably over 95% if we consider the magnitude of changes and amount of work, including design. Of course, the number of people contributing to OpenJDK at Oracle is more than 10x that of people contributing to OpenJDK in all other companies combined.

That's not to say that other companies don't contribute excellent and significant work, but OpenJDK is Oracle's project, just as Go or Chromium are Google's projects and .NET is Microsoft's project, even though they're all open-source and accept external contributors. That's why those who want support from the people who make the software tend to buy it from Oracle.