Linux install JDK detailed steps Linux install JDK Step 1. First download jdk (jdk-1_5_0_02-linux-i586.rpm) from the Internet, recommended
SUN's official website www.sun.com is downloaded and stored in the/home directory. Of course, it works elsewhere. Go to the installation directory www.2cto.com # cd/home # cp jdk-1_5_0_02-linux-i586.rpm/usr/local # cd/usr/local to add executable permissions to all users # chmod + x jdk-1_5_0_02-linux-i586.rpm.bin #. /jdk-1_5_0_02-linux-i586.rpm.bin at this time will generate a file jdk-1_5_0_02-linux-i586.rpm, also to all users to add executable permissions # chmod + x jdk-1_5_0_02-linux-i586.rpm installer # rpm-ivh jdk-1_5_0_02-linux-i586.rpm appears the installation protocol, etc., as per accept. Install JDK in Linux Step 2. Set environment variables. # Vi/etc/profile added at the end # set java environmentJAVA_HOME =/usr/java/jdk-1_5_0_02CLASSPATH =.: $ JAVA_HOME/lib. tools. jarPATH = $ JAVA_HOME/bin: $ PATHexport JAVA_HOME CLASSPATH save and exit. To enable JDK to be used by all users, you can: vi/etc/profile. d/java. sh in the new java. enter the following content in sh: # set java environmentJAVA_HOME =/usr/java/jdk-1_5_0_02CLASSPATH =.: $ JAVA_HOME/lib/tools. jarPATH = $ JAVA_HOME/bin: $ PATHexport JAVA_HOME CLASSPATH save and exit. sh: chmod 755/etc/profile. d/java. step 3 of installing JDK in shLinux. run the echo command on the terminal to check the environment variable settings. # Echo $ JAVA_HOME # echo $ CLASSPATH # echo $ PATH4. check whether JDK is installed successfully. # If the JVM version and related information are displayed, the installation is successful! Then the installation of JDK in Linux is over and the development door is opened. GOGOGO!