1. Use WINSCP to store the JDK compression package in/usr/local/.
2. The file cannot be installed with the RPM-IVH command because it is a compressed package file.
In the console, enter the tar XZVH jdk1.8.0_60 command to extract the JDK files into the current folder.
3. Configure Environment variables:
After you run the profile on the console input command Vi/etc/profile, add the following at the bottom of the file:
Export Java_home=/usr/local/jdk1.8.0_60 (modified based on JDK version and JDK storage location)
Export path= $JAVA _home/bin: $PATH
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
4. The console runs source/etc/profile to make the configuration environment effective.
5. Run java-version to check if the JDK is configured successfully:
, the JDK is configured successfully.
Configuring JDK under Linux (tar.gz)