Install JDK in linux

Source: Internet
Author: User

In some cases, it is better to summarize a document to configure the java environment for installing JDK in linux !!!

1. jdk ..... (Most of them end with. bin)

2. the directory to which you want to install jdk is put (usually your own directory or/usr/java indicates that you need to create mkdir-p/usr/java on your own)

3. Grant jdk installation package permissions (chmod 755 jdk-1_5_0_10-linux-i586-rpm.bin) As you like 777 can also!

4. (./jdk-1_5_0_10-linux-i586-rpm.bin run red part !)
There will be a piece of Sun Protocol, several times the Space key, when asked whether to agree, you can press yes.

The program automatically generates a jdk-1_5_0_10-linux-i586.rpm file, which is the main package and then automatically installs.

5. Configure Environment Variables
You can change the profile file in the etc directory to set environment variables. First, find the profile file in the etc directory.
Add the following code at the end of the opened profile file:

Note! JAVA_HOME =/usr/java/jdk1.5.0 _ 10 is the directory for your installation! Is the directory location in step 2.

Reference
Export JAVA_HOME =/usr/java/jdk1.5.0 _ 10
Export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
Export PATH = $ PATH: $ JAVA_HOME/bin

Author: "bbjava"
 

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.