reset password

Install OpenJDK

Because of Oracle's licensing changes to JDK, I recommend using OpenJDK instead of Oracle's JDK from now on. Functionally these two are actually the same. The differences are there's no official support for OpenJDK (which you probably won't need anyway), but there's also no restriction on how you use it (while Oracle's JDK is limited to non-commercial use unless you buy a commercial license).

Note that if you already have a JDK installed, you should remove it before installing a new version.

On Windows

Download OpenJDK from here -- it comes in a zip file instead of an executable installer. Simply unzip it to a folder on disk, e.g. C:\jdk-11.0.2. After that you'll need to set an environment variable JAVA_HOME to the JDK folder, and you also need to add %JAVA_HOME%\bin to the environment variable PATH. The following video shows the whole process.

On MacOS

Download OpenJDK from here -- it comes in a .tar.gz file, e.g. openjdk-11.0.2_osx-x64_bin.tar.gz. Assuming the file is downloaded to your Downloads folder, open a Terminal and run the following commands:

> cd ~/Downloads
> tar xf openjdk-11.0.2_osx-x64_bin.tar.gz
> sudo mv jdk-11.0.2.jdk /Library/Java/JavaVirtualMachines/

And that's it.

On Linux

Simply install OpenJDK using the package manager of your Linux distribution. For example, on Ubuntu 18.04 Desktop, run the following command in a terminal:

> sudo apt install openjdk-11-jdk

 

 

 

This page has been viewed 2985 times.