Install Oracle Java Runtime Environment (JRE)
To check if you Oracle Java installed, type the following command in Terminal.
which reside at /usr/bin/java
get Oracle Java from the Java.net website at
- Create a folder named
oracle-jreand navigate into it.
- Copy the downloaded “tar.gz” archive file into this directory.
- Select the “tar.gz” archive, right-click it and choose to extract its contents. This will create a directory at the location
XXXXXwill vary according to the version of the JRE that you have downloaded.
Now, test the Java installation using the following command:
If you did not have any Java installation prior to this, then you can make this new Java installation available system-wide by typing the following command.
sudo ln -s /opt/oracle-jre/jreXXXXX/bin/java /usr/bin/java
This will create a link in the
usr/bin directory for your Java executable. You will then be able to access the Java executable without having to use the full path to the
/opt/oracle-jre/jreXXXXX/bin/. For example, the
java -version would start working.