Install JDK 5 in RHEL4

Source: Internet
Author: User
JDK installation in Linux is relatively easy. Take JDK 5 as an example: JDK.

JDK installation in Linux is relatively easy. Take JDK 5 as an example:

: Http://java.sun.com/j2se/1.5.0/download.jsp

Download JDK1.5 latest bin version such as: jdk-1_5_0_12-linux-i586.bin to specified directory

Execute the sh jdk-1_5_0_12-linux-i586.bin file to decompress the generated directory and copy it to the specified directory, such as:/usr/share.

The JDK directory is/usr/share/. In this example, It is/usr/share/jdk1.5.0 _ 12.

Vi/etc/profile

Join:

JAVA_HOME = "/usr/share/jdk1.5.0 _ 12"

PATH = $ PATH: $ JAVA_HOME/bin

Export CLASSPATH =.: $ JAVA_HOME/lib/tools. jar: $ JAVA_HOME/lib/dt. jar

Export PATH JAVA_HOME

The environment variable takes effect if you log out of the user or restart the machine.

Run java-version on the terminal. if the version you want to install is displayed, the installation is successful. In this example, it is: java version "1.5.0 _ 12"

If the version number is incorrect, check whether other versions have been installed before. delete the previously installed version. If JAVA-related options are selected during linux installation, the/usr/bin directory contains the java executable file, which can be renamed or deleted.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.