For Oracle Java 8 (ARMhf) there is a PPA that will install the latest version and keep it up to date. It does install the JDK, but that includes JRE (there is no JRE only install for ARM).
Open a terminal and do the following:
Code: Select all
apt install dirmngr
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt install oracle-java8-installer
This will take a little while, and you'll have to agree to the Oracle terms, so pay attention.
Exit the root terminal and enter java -version to check your installed version (it should be the latest).
[email protected]:~ $ java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) Client VM (build 25.191-b12, mixed mode)
Congrats, you now have the latest Java 8 version, and it will update with the rest of your packages.
For Raspbian Desktop, you can remove the older Java version with apt remove oracle-java8-jdk (but do that after installing the new one).