First step: Download the JDK
Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Step two: Pass the JDK into the Linux virtual machine/java No, just build one.
You can use the Xftp or RZ commands (which are available in the previous section)
Enter/java after incoming entry
Decompression TAR-ZXVF jdk-8u121-linux-x64.tar.gz
Can be extracted after the jdk-8u121-linux-x64 set soft connection//name too long
Ln-s/JAVA/JDK-8U121-LINUX-X64/JDK//Soft connect name is JDK
Here you can set the environment variables:
Vi/etc/profile//Enter SET environment variable
Add the following code at the end
Save and exit
Use command Source/etc/profile to make environment variables effective immediately
Enter Java-version to see if the Java JDK was successfully installed
If the installation succeeds, the following interface will appear
Installing the Java JDK under Linux