Thursday, 5 May 2016

Upgrade java 1.7 to 1.8 in Ubuntu 14.04


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)

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
echo $JAVA_HOME

Set Java home path,

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
echo $JAVA_HOME
/usr/lib/jvm/java-8-openjdk-amd64

Don't pass MaxPermSize to Java 8+

java -version
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~14.04-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)

10 comments:

  1. Thanks @Jojan Paul, This post helped me a lot.

    ReplyDelete
  2. This post is really a great, one of the most meaningful information for me. It can be benefit for the people who are interested in such kind of post. And i am very happy to find this post. Ubuntu Set Static IP

    ReplyDelete
  3. The first thing you should always update system to Install Java Ubuntu. apt-get update && apt-get upgrade is used for updating the system. Java can be used to create anything from software to basic web applications.

    ReplyDelete
  4. The first thing I do after install is system update and install Java ubuntu. This article helped me to upgrade java 17 to 18 version. Thanks.

    ReplyDelete