Update Java¶
- Download the latest version of the Java Development Kit (JDK) as a self-extracting binary file from [http://java.sun.com/javase/downloads/].
- Make it executable and install it into /usr/java/jdk-XXX.
# chmod u+x jdk-XXX.bin # ./jdk-XXX.bin
- Move it to the the same folder with all other Java versions:
# mv /usr/java/jdk-XXX /usr/lib/jvm
- Install the new version within the alternatives system:
# update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-XXX/jre/bin/java 300
- Select the new version as the default using:
# alternatives --config java
- Check the version of the default java installation:
# java -version