Untuk selalu menginstal Java java terbaru, Anda dapat memeriksa Java saat ini
pi @ raspberrypi: ~ $ java -version java versi "1.8.0_65" Java (TM) SE Runtime Environment (build 1.8.0_65-b17) Java HotSpot (TM) Client VM (build 25.65-b01, mode campuran)
hapus OpenJDK
sudo apt-get purge openjdk*
tambahkan kunci digital
sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com EEA14886
tambahkan sumber paket
sudo vim /etc/apt/sources.list
tambahkan baris berikut
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
instal Java 8
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default
hapus Java lama
sudo apt-get purge openjdk*
sudo apt-get purge java7*
sudo apt-get autoremove
periksa kesuksesan
java -version
pi @ raspberrypi: ~ $ java -versi versi java "1.8.0_131" Java (TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot (TM) Client VM (build 25.131-b11, mode campuran)