Oracle Java SE 1.7.0_80 Installation in the Ubuntu

At this moment, I’ve been working with the Liferay 6.2. This Liferay needs Java to be running. Somehow, the 6.2 have some issues when working with the latest Oracle Java version. Because of this, I need to keep the Oracle Java 1.7 installed. But the problem is, the old oracle java version not longer fully supported for free.

From the Oracle Java downloads page:

“Updates for Java SE 7 released after April 2015, and updates for Java SE 6 released after April 2013 are only available to Oracle Customers through My Oracle Support (requires support login).

Java SE Advanced offers users commercial features, access to critical bug fixes, security fixes, and general maintenance”.

Therefore, I need to install the old version by hand, following these steps.

  1. nanda@nanda-prod:~$ cd /opt
  2. nanda@nanda-prod:/opt$ wget http://nanda.web.id/files/jdk-7u80-linux-x64.tar.gz
  3. nanda@nanda-prod:/opt$ tar -xzvf jdk-7u80-linux-x64.tar.gz
  4. nanda@nanda-prod:/opt$ ln -s /opt/jdk1.7.0_80 java
  5. nanda@nanda-prod:/opt$ ln -s /opt/jdk1.7.0_80 jre
  6. nanda@nanda-prod:/opt$ sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/bin/java" 1
  7. nanda@nanda-prod:/opt$ sudo update-alternatives --install "/usr/bin/javac" "javac" "/opt/java/bin/javac" 1
  8. nanda@nanda-prod:/opt$ sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/opt/java/bin/javaws" 1
  9. nanda@nanda-prod:/opt$ sudo update-alternatives --config java
  10. nanda@nanda-prod:/opt$ java -version

    java version “1.7.0_80”
    Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
    Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

Hope it helps.

Cheers,

Oracle Java SE 1.7.0_80 Installation in the Ubuntu
Tagged on:     

Leave a Reply

Your email address will not be published. Required fields are marked *