Installing the Java environment under Linux
First choose 32-bit or 64-bit jdk,i586 corresponding to 32-bit according to your Linux system, x64 corresponds to 64 bits.
The format of the jdk1.7 installed here is the rpm file
Installation steps
1 Add executable permissions, command as follows
chmod 777 JDK File
2 installation
RPM-IVH JDK Files
Installed by default under the/usr/java path
3 Configuration of environment variables
Increase under/etc/profile
#set Java enviroment
java_home=/usr/java/jdk1.7
Path= $JAVA _home/bin: $PATH
Classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export Java_home
Export PATH
Export CLASSPATH
4 test configuration is successful
Execute the following command
Echo $JAVA _home
Echo $PATH
Echo $CLASSPATH
5 notes:
If you have previously installed the JDK on your system, you must first uninstall
See if the JDK has a command installed
Rpm-qa|grep JDK
Uninstall command
RPM-E--nodeps JDK file name
This article is from the "Venus Blog" blog, be sure to keep this source http://10678423.blog.51cto.com/10668423/1690230
Summary of configuration jdk1.7 under Linux