I'm in the process of updating the post to recommend Oracle Java instead of OpenJDK for performance reasons.
If you have already installed OpenJDK, it's not too difficult to remove it. Stop the Nxt server and run the following:
sudo apt-get remove openjdk-8-jre
sudo apt-get autoremove
Download the Oracle JDK version for
Linux ARM 32 Hard Float ABI from here:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.htmlTo use wget you have to include a header to accept the Oracle license:
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/8u71-b15/jdk-8u71-linux-arm32-vfp-hflt.tar.gz
Extract the file:
tar xvzf jdk-8u71-linux-arm32-vfp-hflt.tar.gz
Rename and move the extracted directory:
sudo mv jdk1.8.0_71/ /usr/local/java
Update your system to use java at this location:
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/bin/javac" 1
sudo update-alternatives --set java /usr/local/java/bin/java
sudo update-alternatives --set javac /usr/local/java/bin/javac
Set your environment variables:
sudo nano /etc/profile
Add the following to the end of the file:
JAVA_HOME=/usr/local/java
JRE_HOME=$JAVA_HOME/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH
Reload /etc/profile and check the java version:
source /etc/profile
java -version
If everything is correct you should see the following output:
java version "1.8.0_71"
Java(TM) SE Runtime Environment (build 1.8.0_71-b15)
Java HotSpot(TM) Client VM (build 25.71-b15, mixed mode)
When new versions of Oracle Java are released, you can simply extract them and overwrite the directory at /usr/local/java.