Unix
I have successfully installed JDK (JDK-1_5_0_02-LINUX-I586.RPM) on the HP Workstation Visualize C3600 UNIX system and My Computer Fedora Core 3, and the process is simple: 1. Download JDK (jdk-1_5_0_02-linux-i586.rpm) from the Internet, recommend Sun's official website www.sun.com, download it and put it in the/home directory, of course, elsewhere. Enter the installation directory #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 now generates the file jdk-1_5_0_02-linux-i586.rpm and also adds executable permissions to all users #chmod +x JDK-1_5_0_02-LINUX-I586.RPM Installer #rpm-ivh jdk-1_5_0_02-linux-i586.rpm installation protocol, etc., press <Enter> accept.
2. Set environment variables. #vi/etc/profile joins #set Java environmentjava_home=/usr/java/jdk-1_5_0_02classpath= on the last side.: $JAVA _home/ Lib.tools.jarpath= $JAVA _home/bin: $PATHexport java_home CLASSPATH path Save exit.
To make the JDK available to all users, you can do this: vi/etc/profile.d/java.sh in the new java.sh, enter the following: #set Java environmentjava_home=/usr/java/jdk-1_5_0 _02classpath=.: $JAVA _home/lib.tools.jarpath= $JAVA _home/bin: $PATHexport java_home CLASSPATH path Save exit, Then assign permissions to java.sh: chmod 755/etc/profile.d/java.sh
3. Use the echo command at the terminal to check environment variable settings. #echo $JAVA _home#echo $CLASSPATH #echo $PATH
4. Check that the JDK is installed successfully. #java-version If you see the JVM version and related information, the installation is successful!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.