Linux in the system how to configure jdk1.8
1 jdk download
file name
jdk-8u121-linux-x64.tar.gz
download link
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Baidu network disk Download
Links : https://pan.baidu.com/s/1pfRf2AMWd7yIGTzXnWBkew Password : 8hot
2 jdk configuration
Edit etc directory profile
Enter sudo vim etc / profile
Press Enter, the following picture
Press i or insert to insert the following file last
Note that only the Javah_home path to
java_home = / media / lin / machine / tools /jdk1.8.0_161
PATH=$java_home/bin:$PATH
export java_home PATH
Get the following picture
After inserting the press Esc to exit the editor, enter: WQ press Enter
Finally, enter Java -version to see if configured.