Install JDK in Linux

Source: Internet
Author: User

Download JDK of Linux from 1.cn.sun.com.
2. Mount the files in the window to the Linux system (Virtual Linux operating system, mounting using ISO ).
3. CP (copy) j2sdk.../Home: copy the JDK of Linux to the/home directory.
4. Switch CD/home to the home directory.
Use chmod 755 to grant permissions
5. Install./j2sk... bin
6. Please note that, during the installation process, there may be insufficient permissions and so on. Use root to log on. (Or use su root to transfer the root permission to log on to the installation. It is not recommended)
7. If any installation fails, right-click j2sdk.. bin to set
8. Yes agree to the Agreement
9. Check whether the installation is successful using Java-version.
10. view the etc/profile (Environment configuration file). Use # To comment out the previous JDK version configuration.

 

 

II:

1. Download JDK from Linux

Wget http://download.oracle.com/otn-pub/java/jdk/6u25-b06/jdk-6u25-linux-x64.bin (which is a 64-bit operating system)

The file name may be incorrect after the download.

Music Video jdk-6u25-linux-x64.bin /? E/= 1306907238/& H/= 7c38acd02bf1adadc2f72b8e8372e5d5 jdk-6u25-linux-x64.bin

 

2. Install JDK

/Jdk-6u25-linux-x64.bin

 

3. Configure the environment

(1). To edit/etc/profile for all users

VI/etc/profile

Add the following at the very end:

# Set Java environment
Java_home =/usr/j2se
Classpath =.: $ java_home/lib. Tools. Jar
Path = $ java_home/bin: $ path
Export java_home classpath path

(2). If the file is valid only for the current user, edit the. bash_profile in the user's home directory. If the file does not exist, create it.

Vi. bash_profile

# Set Java environment
Java_home =/usr/j2se
Classpath =.: $ java_home/lib. Tools. Jar
Path = $ java_home/bin: $ path
Export java_home classpath path

Then you can log on again to take effect.

 

Java-version

Javac

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.