Wednesday, April 20, 2016

Install Java SE Development Kit 8

Howto install Java SE Development Kit 8 on Linux terminal

1. Download at http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2. Check existing java version in your system and OS version.
  rex@Inspiron-1525:~$ javac -version
  rex@Inspiron-1525:~$ uname -m
3. Change to root priviledge and make the following directory.
  rex@Inspiron-1525:~$ sudo su
  root@Inspiron-1525:/home/ronald# mkdir /opt/jdk
4. Extract the .tar.gz file downloaded and open new created directory
  root@Inspiron-1525:~/Downloads# tar -zxf jdk-8u91-linux-x64.tar.gz  -C /opt/jdk
  root@Inspiron-1525:~/Downloads# ls /opt/jdk/
5.Setting Oracle JDK as the default JVM
root@Inspiron-1525:~/Downloads# update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_91/bin/java 100
root@Inspiron-1525:~/Downloads# update-alternatives --install /usr/bin/javac javac  /opt/jdk/jdk1.8.0_91/bin/javac 100
6. Verify your installation.
  root@Inspiron-1525:~/Downloads# update-alternatives  --display java
  root@Inspiron-1525:~/Downloads# update-alternatives  --display javac

No comments:

Post a Comment