This repository has been archived on 2024-04-14. You can view files and clone it, but cannot push or open issues or pull requests.
help-center-docs/software/java/en.md

1.3 KiB

title
Java

Java

This article covers obtaining open source Java as well as Oracle Java.

Installation

If you are looking for OpenJDK or OpenJRE, install openjdk-8 from the repository. The instructions below are for Oracle Java.

You can set up Java by following the instructions below:

JRE

Grab the Java Runtime Environment (JRE) as .tar.gz from the Oracle Download Page.

Extract JRE and move it to /opt:

cd ~/Downloads
tar xf jre-8u121-linux-x64.tar.gz
sudo mv jre1.8.0_121 /opt/
sudo ln -svf /opt/jre1.8.0_121/bin/java /usr/bin/java

To enable Java in Firefox:

mkdir -p ~/.mozilla/plugins
ln -s /opt/jre1.8.0_121/lib/amd64/libnpjp2.so ~/.mozilla/plugins/libnpjp2.so

JDK

Grab the Java Development Kit (JDK) as .tar.gz from the Oracle Download Page.

Extract JDK and move it to /opt:

cd ~/Downloads
tar xf jdk-8u121-linux-x64.tar.gz
sudo mv jdk1.8.0_121 /opt/
sudo ln -svf /opt/jdk1.8.0_121/bin/java /usr/bin/java

To enable Java in Firefox:

mkdir -p ~/.mozilla/plugins
ln -s /opt/jdk1.8.0_121/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/libnpjp2.so