Install Java in Linux

Source: Internet
Author: User
Install Java-general Linux technology-Linux programming and kernel information in Linux. For details, refer to the following section. Java is a very important technology in any operating system. A large number of Web pages use Java or JavaScript. Many programs, such as Zend Studio, use Java programs in the Java Runtime Environment, and many developers also use Java. Unfortunately, many Linux vendors have not released the corresponding Java toolkit due to license fees. Of course, some Java execution is free, such as GCJ or GNU Compiler. However, none of these are Sun's Java projects, so there will be a debate about who is strong and who is weak.

Fortunately, installing Java in Linux is quite simple. You can visit the Java download website and select all the operating system types you have installed (Linux, Linux AMD64, Solaris, etc ). Once you have chosen to download an object-either a self-decompressed execution file or a self-decompressed RPM file, you can install it. Currently, the latest version is 5.0:

# Mkdir-p/usr/local/java
# Cd/usr/local/java
# Mv/path/to/jre-1_5_0_05-linux-amd64.bin.
# Chmod u + x jre-1_5_0_05-linux-amd64.bin
#./Jre-1_5_0_05-linux-amd64.bin

If you want to install Java into site-wide, set the installation path to the root directory. If you only want to install Java for yourself, you can install it ~ /Bin/java or other suitable locations. In the preceding example, JRE is installed in/usr/local/java/jre1.5.0 _ 05 /. Run the following code to get a test result:

# Cd jre1.5.0 _ 05/bin
#./Java-version

To allow users to use Java, add Java to the default PATH setting by editing/etc/profile:

PATH = $ PATH:/usr/local/java/jre1.5.0 _ 05/bin
JAVA_HOME =/usr/local/java/jre1.5.0 _ 05
Export $ PATH $ JAVA_HOME
Related Article

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.