(Solved) How To Manually Install Oracle Java Ubuntu in easy way

oracle-java
Oracle Java is a programming technology originally developed by "Sun Microsystems" and later acquired by Oracle. This article shows you the way to manually install the latest Oracle Java Development Kit (OracleJDK) in Ubuntu.

Download jdk from java official website

Enter in root privileges:
$ sudo -i

Go to Downloads Directory where your JDK exists.
root@ansari:~# cd ..
root@ansari:~# cd /home/user/Downloads

Create a directory for your JDK installation:
root@ansari:~#  mkdir /opt/jdk

and extract java into the /opt/jdk directory:
root@ansari:~# tar -zxf jdk-8u131-linux-x64.tar.gz -C /opt/jdk

Verify that the file has been extracted into the /opt/jdk directory.
root@ansari:~#  ls /opt/jdk

To set it as the default JVM in your machine run:
root@ansari:~#  update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_131/bin/java 100
root@ansari:~#  update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_131/bin/javac 100

Verify that java has been successfully configured by running:
root@ansari:~#  update-alternatives --display java
root@ansari:~#  update-alternatives --display javac

Another easy way to check your installation is:
root@ansari:~#  java -version


SHARE

Ibrar Ansari

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment