[ubuntu] installing Oracle java

unzip the java package into a folder under /opt/

sudo update-alternatives –install “/usr/bin/java” “java” “/opt/java/64/jdk1.8.0_77/bin/java” 1

sudo update-alternatives –set java /opt/java/64/jdk1.8.0_77/bin/java

sudo update-alternatives –install “/usr/bin/javac” “javac” “/opt/java/64/jdk1.8.0_77/bin/javac” 1

sudo update-alternatives –set javac /opt/java/64/jdk1.8.0_77/bin/javac

Advertisements