Start to use linux to install java

Source: Internet
Author: User
Start to use linux to access the Internet and install java-general Linux technology-Linux programming and kernel information. The following is a detailed description. Now I can access the internet. I am using a machine that has been occupied by my colleagues. I want to learn more. I didn't want to install too many things on his machine, so I mixed my computer and started the computer. I have never been able to access the Internet. today, I have the opportunity to play with him online. go to linux and modify the ip address and other things. Open mozllia and enter www.linuxdiyf.com. happy!

Go to sun to get the jdk, and search for articles on installing java in linux on the Internet. download and decompress (as simple as window ). think about it. switch to the command mode. (dizzy ). sort it out:

!. First go to The http://java.sun.com/j2se/1.5.0/download.jsp to download jdk (install it with the root user under the command)

2. # chmod 755 j2sdk-1.5.0_06-linux-i586-rpm.bin
#./J2sdk-1.5.0_06-linux-i586-rpm.bin

There will be a piece of Sun Protocol, several times the Space key, when asked whether to agree, you can press yes.

Sun Microsystems, Inc.
Binary Code License Agreement
For

The program automatically generates a j2sdk-1_5_0_06-linux-i586.rpm file, which is the main package, which will be installed below

4. # rpm? Ivh j2sdk-1_4_2_06-linux-i586.rpm (Be sure to root users, I am in this step error, return to the interface prompt to enter the root password)

This method is installed in the/user/java directory by default.

5. Set Environment Variables

Create a java. sn file under/etc/profile. d as follows:

Export JAVA_HOME =/usr/java/j2sdk1.4.2 _ 06
Export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
Export PATH = $ PATH: $ JAVA_HOME/bin

6. Now we can write Helloworld. java to test the following.

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.