Linux Java Configuration

Source: Internet
Author: User

1. See if Linux has Java installed

Java (or) java-version

If there is an installation required to perform step two & third, no fourth step is performed.

2. View JAK information

Rpm-qa | grep java

3. Uninstall the installed Java

Yum-y Remove Javaxxxxx (the Java RPM package looked up in the second step)

4. Installing the JDK

Create a Java under/usr and install the Java program in this directory

Mkdir/usr/java

5, will download the good installation file into/usr/java jdkxxxxxxxxxxx.gz

6. Unzip GZ

TAR-ZXVF jdkxxxxxxxxxxx.gz

7. Delete jdkxxxxx.gz

8. Configure Environment variables

Vim/etc/profile

Export PATH USER LOGNAME MAIL HOSTNAME histsize Histcontrol

Export java_home=/usr/java/jdk1.7.0_60

Export path= $JAVA _home/bin: $PATH

Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar

9, execute the configuration file, make it effective immediately

Source/etc/profile

10. Verify that Java is installed successfully

Java-version


Linux Java Configuration

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.