Summary of configuration jdk1.7 under Linux

Source: Internet
Author: User

Installing the Java environment under Linux

First choose 32-bit or 64-bit jdk,i586 corresponding to 32-bit according to your Linux system, x64 corresponds to 64 bits.

The format of the jdk1.7 installed here is the rpm file

Installation steps

1 Add executable permissions, command as follows

chmod 777 JDK File

2 installation

RPM-IVH JDK Files

Installed by default under the/usr/java path

3 Configuration of environment variables

Increase under/etc/profile

#set Java enviroment

java_home=/usr/java/jdk1.7

Path= $JAVA _home/bin: $PATH

Classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar


Export Java_home

Export PATH

Export CLASSPATH

4 test configuration is successful

Execute the following command

Echo $JAVA _home

Echo $PATH

Echo $CLASSPATH

5 notes:

If you have previously installed the JDK on your system, you must first uninstall

See if the JDK has a command installed

Rpm-qa|grep JDK

Uninstall command

RPM-E--nodeps JDK file name

This article is from the "Venus Blog" blog, be sure to keep this source http://10678423.blog.51cto.com/10668423/1690230

Summary of configuration jdk1.7 under Linux

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.