Install jdk-6u45-linux-x64.bin in RedHat Linux

Source: Internet
Author: User

Install jdk-6u45-linux-x64.bin in RedHat Linux

1. Download jdk-6u45-linux-x64.bin from Oracle

Download file: jdk-6u45-linux-x64.bin

2. Copy jdk-6u45-linux-x64.bin to/usr/java

3 go to the/usr/java directory and modify the executable chmod u + x jdk-6u45-linux-x64.bin for the jdk-6u45-linux-x64.bin

4. Perform jdk-6u45-linux-x64.bin
./Jdk-6u45-linux-x64.bin for Installation
5. Enter/etc/profile to configure environment variables.
6. Set environment variables and add the following lines at the end

Export JAVA_HOME =/usr/java/jdk1.6.0 _ 17
Export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
Export PATH = $ PATH: $ JAVA_HOME/bin

(Note: In linux, environment variables are separated by ":", not ";")
7. restart the system reboot
(Remember to restart the system after modification)

8. Test

[Root @ hn ~] # Vi Test. java
Class Test
{
Public static void main (String [] args)
{
System. out. println ("Hello World! ");
}
}

[Root @ localhost ~] # Javac test. java
[Root @ localhost ~] # Java test
Hello world!

Done!

RedHat Linux Server 5.4 installation jdk-6u22-linux-x64-rpm.bin

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.