• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / How to Install JAVA 8 (JDK 8u45) on Ubuntu 15.04, Ubuntu 14.04 and Ubuntu 14.10

How to Install JAVA 8 (JDK 8u45) on Ubuntu 15.04, Ubuntu 14.04 and Ubuntu 14.10

By Sourabh / June 23, 2015 Category: How To, Ubuntu

Download and Install JAVA 8 on Linux Ubuntu. How to Install JAVA 8 (JDK 8u45) on Ubuntu 15.04, Ubuntu 14.04 and Ubuntu 14.10. The stable release of Java version is 1.8.0_45 i.e JDK 8u45.

Please note that many Linux distribution are shipped with OpenJDK, other version of Java. OpenJDK is not developed by Sun Microsystems, instead OpenJDK is an open source implementation of Java application.

Before you begin the installation, run the following command to verify the version of Java already installed on the system.

$ java -version

Java-01

Now, Make a directory where you want to install Java. For access to all users, install Java in the /opt/java directory. Run the following commands to create the directory:

$ sudo mkdir /opt/java && cd /opt/java

java-screen

Now run the following command to download Java installer files directly into the /opt/java directory:

 

java-screen-023
For 32-bit Systems

$ cd /opt/java
$ sudo wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-i586.tar.gz"
$ tar -zxvf jdk-8u45-linux-i586.tar.gz

For 64-bit Systems

$ cd /opt/java
$ sudo wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz"
$ tar -zxvf jdk-8u45-linux-x64.tar.gz

Next, run the commands given below to tell system where java is installed:


$ cd jdk1.8.0_45/
$ update-alternatives --install /usr/bin/java java /opt/java/jdk1.8.0_45/bin/java 100
$ update-alternatives --config java

Now Update Java Alternatives using the following command:

$ update-alternatives --install /usr/bin/javac javac /opt/java/jdk1.8.0_45/bin/javac 100
$ update-alternatives --config javac

Again update the jar alternatives:

$ update-alternatives --install /usr/bin/jar jar /opt/java/jdk1.8.0_45/bin/jar 100
$ update-alternatives --config jar

Finally set the Java Environment Variables.

$ export JAVA_HOME=/opt/java/jdk1.8.0_45/
$ export JRE_HOME=/opt/java/jdk1.8.0._45/jre
$ export PATH=$PATH:/opt/java/jdk1.8.0_45/bin:/opt/java/jdk1.8.0_45/jre/bin

Now just to confirm, verify the Java version again (find command above).

Enable Java Support in Firefox

10. To enable Java 8 JDK 8u45 Support in Firefox, you need to run following commands to enable Java module for Firefox.

On Debian, Ubuntu and Mint

For 32-bit Systems

$ update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /opt/java/jdk1.8.0_45/jre/lib/i386/libnpjp2.so 20000

For 64-bit Systems

$ update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /opt/java/jdk1.8.0_45/jre/lib/amd64/libnpjp2.so 20000

On RHEL, CentOS and Fedora

For 32-bit Systems

$ alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /opt/java/jdk1.8.0_45/jre/lib/i386/libnpjp2.so 20000

For 64-bit Systems

$ alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /opt/java/jdk1.8.0_45/jre/lib/amd64/libnpjp2.so 20000

Now restart Firefox and enter about:plugins in the URL/address bar. You will get the following screen verifying the Java 8 JDK 8u45 Support in Firefox browser:

Java-8-Support-in-Firefox

Image via http://www.tecmint.com/

Tags: Download JAVA 8 (JDK 8u45) Ubuntu, DownloadJAVA 8 (JDK 8u45) Linux, Install JAVA 8 (JDK 8u45) in Linux, Install JAVA 8 (JDK 8u45) in Ubuntu, Install JAVA 8 (JDK 8u45) in Ubuntu 14.04, Install JAVA 8 (JDK 8u45) in Ubuntu 14.10, Install JAVA 8 (JDK 8u45) in Ubuntu 15.04, Install Java 8 in Linux, Install Java 8 in Ubuntu, Install Java 8 in Ubuntu 14.04, Install Java 8 in Ubuntu 14.10, Install Java 8 in Ubuntu 15.04, JAVA 8 (JDK 8u45) Linux, JAVA 8 (JDK 8u45) Ubuntu, JAVA 8 (JDK 8u45) Ubuntu PPA, Linux Install Java 8, Linux Install JAVA 8 (JDK 8u45), Linux JAVA 8 (JDK 8u45), Ubuntu 14.04, Ubuntu 14.10, Ubuntu 15.04, Ubuntu Install Java 8, Ubuntu Install JAVA 8 (JDK 8u45), Ubuntu JAVA 8 (JDK 8u45)

Primary Sidebar

Latest Posts

Delete Directory And Contents Recursively Without Prompt On Linux

Check User Login History In Ubuntu Linux Command Line

Use Locate Command To Find File In Linux Terminal By Name

How To Change Terminal Color In Ubuntu Command Line

How To Run Fsck Manually In Linux To Fix Unexpected Inconsistency

How To Fix Broken Packages On Ubuntu From Terminal

Re Execute The Previous Command In Linux Ubuntu Command Line

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap