Install jdk tar.gz

  • Extarct files jdk_name.tar.gz
                              sudo tar -zxvf jdk_name.tar.gz

  • sudo make directori in usr/liv/ dengan nama jvm
                              sudo mkdir /usr/lib/jvm

  •  move the jdk diretori in usr/lib/jvm
                                 sudo cp -rf jdk_name /usr/lib/jvm

  • Register the instalation path to the system
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.8.0/bin/javaws" 1 


  • Change the default selection used JDK
 
sudo update-alternatives --config "java"
sudo update-alternatives --config "javac"
sudo update-alternatives --config "javaws"
 
  • Show Version off java and javac
 
java -version
javac -version  

Tidak ada komentar:

Posting Komentar