Reference article: Blog Park-three-dimensional ants
Linux Commune
1, first need to download the corresponding Platform Jdk:oracle official website
2. Install the JDK using the Yum or RPM command:
Yum install ./jdk-8u40-linux-x64.rpm
3. After configuring the environment variable Vi/etc/profile, enter the following at the penultimate line:
Export JAVA_HOME=/USR/JAVA/JDK1. 8 . 0_40export PATH= $JAVA _home/bin: $PATHexport CLASSPATH=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/ Tools.jar
If you need to use it under the current user, it is recommended that the above environment variable be appended to the ~/.bash_profile file.
4. Make the environment variable effective source/etc/profile
5. Install the installed Oracle JDK into the system:
Update-alternatives--install /usr/bin/java java/usr/java/jdk1. 8 - update-alternatives-install /usr/bin/javac javac/usr/java/jdk1. 8 -
6. Set the Oracle JDK as the default:
Update-alternatives--config Java
At this point if there are multiple JDK (such as OPENJDK and Oracle JDK), will come out a list, the current default will be in front of the list has a "*" number, then we have to choose the Oracle JDK we just installed the Java serial number, enter this serial number, the return on the line.
OPENJDK and Oracle JDK coexistence under Fedora Server 21