Java - Install

Updated: 2020-12-29

Install Prebuilt OpenJDK

Download OpenJDK from

Extract the package:

$ tar xvzf openjdk-<version>_bin.tar.gz

Add this to ~/.bash_profile or ~/.bashrc:

export JAVA_HOME=/path/to/jdk-<version>


Then "source" it:

$ . ~/.bashrc

Verify that Java is correctly installed:

$ java -version

Install Prebuilt Oracle JDK

Oracle JDK from:

If you are using .tar.gz, it would be similar to OpenJDK. If you are installing .dmg on macOS, JDK should be installed in this folder: