Install Oracle JDK 14.04 on Ubuntu 1.8 LTS
(1) download JDK
Http://www.oracle.com/technetwork/cn/java/javase/downloads/index.html
(2) Extract
(3) create a jvm File
(4) Move to/usr/lib/jvm
(Note: If there is no jvm file, running this statement will automatically create the jvm file, but it will only put all the files in jdk1.8.0 _ 25 into the jvm, instead of placing the jdk1.8.0 _ 25 and its files in the jvm file, the two are different)
(5) set JDK Environment Variables
(Also in ~ /. Bashrc modified, the difference is:
The setting method of/etc/profile is valid for all login users.
~ /. Bashrc is only valid for the current user
)
(6) Make the modification take effect immediately
You can enter env to check whether JAVA_HOME is successfully configured.
(7) Verify JDK
(8) set to default
Enter sudo update-alternatives -- display java to view the default jdk information. The error message "no alternatives for java" is displayed at the beginning.
Sudo update-alternatives -- install/usr/bin/java: Your JDK path/java 300 (priority)
Sudo update-alternatives -- install/usr/bin/javac your JDK path/javac 300 (priority)
If you have multiple versions and need to modify the default version, enter
Sudo update-alternatives -- config java
Sudo update-alternatives -- config javac
A prompt will be displayed: to maintain the current value [*], please press the Enter key or enter the selected number
Enter the priority (300) and press Enter.
Enter display to check the default version.
Install JDK 7 In Ubuntu (with Clojure download)
Install JDK 12.04 in Ubuntu
CentOS6.3 install JDK and environment Configuration
Install JDK 8 on Ubuntu 14.04
Install JDK graph analysis in Ubuntu