The first download was the. rpm. bin version, which always showed a dependency check failure during installation. Later, the. bin version was directly downloaded and the installation was successful. I downloaded the jdk1.6.0 _ 16 version, first use the following command to give. binfile execution right: chmod + xjdk-6u16-dlj-lin...
The first download was the. rpm. bin version, which always showed a dependency check failure during installation. Later, the. bin version was directly downloaded and the installation was successful.
I downloaded JDK 1.6.0 _ 16. First, use the following command to grant the. binfile execution right:
Chmod + x jdk-6u16-dlj-linux-i586.bin
Then install with a./jdk-6u16-dlj-linux-i586.bin;
After installing the file, you must set the environment variable.
Vi/etc/profile
Add the following variables to the file:
Export JAVA_HOME =/usr/java/jdk1.6.0 _ 16
Export PATH = $ PATH: $ JAVA_HOME/bin: $ JAVA_HOME/jre/bin
Export CLASSPATH =.: $ JAVA_HOME/lib: $ JAVA_HOME/jre/lib: $ CLASSPATH
Replace/usr/java/jdk1.6.0 _ 16 with the actual installation address.
Restart linux and enter java-version to view the version. If no problem occurs, the installation is complete.
If you encounter
Error occurred during initialization of VM
Java/lang/NoClassDefFoundError: java/lang/Object
Check whether there are unpack rt. pack or tools. pack files in the lib and jre/lib folders.
Run the unpack200 rt. pack rt. jar command to decompress the package.
Author: "FLYINGMAN"