![]() Update your $JAVA_HOME by adding the following lines at the end of your /etc/profile: JAVA_HOME=/usr/local/java/jdk1.8.0_25 Sudo update-alternatives -set javaws /usr/local/java/jdk1.8.0_25/bin/javaws Sudo update-alternatives -set javac /usr/local/java/jdk1.8.0_25/bin/javac Sudo update-alternatives -set java /usr/local/java/jdk1.8.0_25/bin/java Sudo update-alternatives -install "/usr/bin/javaws" "javaws" "/usr/local/java/jdk1.8.0_25/bin/javaws" 1 Sudo update-alternatives -install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.8.0_25/bin/javac" 1 (1) Download the tar.gz (x86 or 圆4, depending on your platform)of latest JDK from the Oracle web site (2) extract the content of the tar.gz file into /usr/local/java/ (you will need root privileges) (3) supposing the latest version is jdk1.8.0_25 then run the following commands: sudo update-alternatives -install "/usr/bin/java" "java" "/usr/local/java/jdk1.8.0_25/bin/java" 1
0 Comments
Leave a Reply. |