1. Create a new directory: Mkdir/usr/java this directory to store and install JDK files
2. Extract the transferred installation-free JDK bin compression pack into the/usr/java file
Execute command:./jdk-6u27-linux-x64.bin
3. Environment variable configuration:
1) Command: Vi/etc/profile into the editing interface press the I letter to insert the command
2 The JDK has been installed to the directory/usr/java file at the front of the operation
3 Add the following code to the top of the editing interface:
Java_home=/usr/java/jdk1.6.0_27
Path= $JAVA _home/bin: $PATH
Classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
The screenshot in Linux is as follows:
4 ESC back to command mode: Wq Save exit
5 Run Command: java–version if the following interface appears to indicate that the JDK installation configuration was successful