Install Oracle Java 8 on Manjaro 16.10

This tutorial will guide you through the installation of Oracle Java 8 Runtime Environment (JRE) on Manjaro 16.10 Linux. Java is an essential software or package needed by many software/applications. I am using Manjaro Xfce edition and by default, it already shipped with OpenJDK Runtime Environment. You may check your Manjaro with this command to see if Java is installed already.

java -version

Output:

check java version

Steps to install Oracle Java 8 on Manjaro

Step 1. Download Oracle Java 8

Download the Oracle Java 8 package from the official website. Alternatively, you can simply copy and paste the following command on Terminal to download the Oracle Java 8 package.

wget http://javadl.oracle.com/webapps/download/AutoDL?BundleId=216424 -o java-latest

For 32 bit system, use this one

wget http://javadl.oracle.com/webapps/download/AutoDL?BundleId=216422 -o java-latest

Step 2. Extract the package

Use this command to extract the package

tar -zxvf java-latest

extract java

Step 3. Move/Copy the package to /opt

Now copy or move the extracted directory to /opt.

sudo cp -R jre1.8.0_111 /opt/

Example:

move java to opt

Step 4. Create Symlink

If you have OpenJDK Java installed, we need to move existing java binary first. Use this command below to move the existing OpenJDK java.

sudo mv /usr/bin/java /usr/bin/java_backup

Now we can create symlink to our Oracle Java

sudo ln -s /opt/jre1.8.0_111/bin/java /usr/bin/java

java symlink

Now check Java version once again and now you should see something like this

java version

Optionally, we need to configure Firefox to use this new Java version.

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

Now close any running Firefox session and open it again. Type "about:plugins" on the address bar. You should see Oracle Java listed there.

oracle java 8 on firefox 

Thank you for reading this post to install and configure Oracle Java 8 on Manjaro Linux.

5 comments

Many thanks!

Resolved issues for me.

I rarely leave any comment on these posts, but if anyone sees this, please know this instruction worked perfectly on November 2, 2019. My system is Manjaro with Linux Kernel version 4.19

This is very useful for me. Thank you


EmoticonEmoticon