menu

How to - Install JDK menggunakan file tar.gz ubuntu


== INSTALL JDK

  1. Download file tar gz jdk dari
    • download dari oracle
    • pastikan klik Accept License Agreement
    • Download untuk linux (sesuaikan arsitektur os)
  2. extract filr tar.gz
    • bisa dengan GUI archiev manager
    • atau dengan
      • tar -xvf jdk-8-linux-i586.tar.gz (32-bit)
      • tar -xvf jdk-8-linux-x64.tar.gz (64-bit)
  3. pindahkan file hasil extract ke /usr/lib (file bernama) jdk1.8.0_73
    • sudo mkdir -p /usr/lib/jvm
    • sudo mv jdk1.8.0_73 /usr/lib/jvm/
  4. jalankan file
    • sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_73/bin/java" 1
    • sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_73/bin/javac" 1
    • sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.8.0_73/bin/javaws" 1
  5. Allow permission
    • sudo chmod a+x /usr/bin/java
    • sudo chmod a+x /usr/bin/javac
    • sudo chmod a+x /usr/bin/javaws
    • sudo chown -R root:root /usr/lib/jvm/jdk1.8.0_73
  6. Run update java
    • sudo update-alternatives --config java
    • choose jdk1.8.0_73 misal nomor 3
    • lakukan juga pada
      • sudo update-alternatives --config javac
      • sudo update-alternatives --config javaws
  7. Restart apparmor
    • sudo /etc/init.d/apparmor restart
  8. Check it
    • java -version
    • tampilan seharusnya
      • java version "1.8.0_73"
      • Java(TM) SE Runtime Environment (build 1.8.0_73-b132)
      • Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
== DONE!!!

---Semoga Membantu---