Java is still free! You can download the free-to-use, open-source-licensed version of Java from several sites. This is not a complete list.

The entire JDK is maintained as an open source project, and the OpenJDK source tree is used (with changes and additions) to build the commercial and supported Oracle JDKs. The OpenJDK repository has the source code for the entire JDK. You can in fact build your own JDK fairly easily from this GitHub repository; see my article on the JDK source code, about halfway down the page.

You can also get the Oracle version, which may have more restrictive licensing including license fees and paid support, directly from Oracle’s website.

The above list does not include alternate JVMs such as Graal VM or OpenJ9, which may offer faster performance.

If you are going to have more than one version of the JDK on your Unix/Linux/macOS computer, check out SDKMAN, which lets you easily install and switch between them.

Java Resources | Java Info | Java Cookbook | DarwinSys