Jdk:
Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Create a new software directory in the root directory
Upload the downloaded JDK to the software folder.
(using WINSCP makes it easy to drag and drop files under Windows into Linux.) )
Go to the Software directory
Input command: Cd/software
Input command: LL
You'll see our JDK package.
Three, unzip the file
Unzip command tar XZVF jdk-8u111-linux-x64.tar.gz
After decompression, you can delete the previously transmitted compressed package
deleting files rm-f jdk-8u111-linux-x64.tar.gz
5. Configuring the JDK environment variables
Configuring a JDK similar to Windows requires three environment variables to be configured
Enter the letter A or I after vi/etc/profile to enter the edit state, add the following variable in the file
Enter the command to add an environment variable:
Export java_home=/software/jdk1.8.0_111
Export classpath=.: $JAVA _home/jre/lib/rt.jar: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export path= $JAVA _home/bin: $PATH
Enter the command to view the environment variables:
Echo $CLASSPATH
Echo $PATH
Enter a command to view the version of the JDK
Java-version
Configuring the JDK environment variables under Linux