Linux installation JDK

Source: Internet
Author: User

wget--no-cookie--header "cookie:s_cc=true; Oraclelicense=accept-securebackup-cookie; s_nr=1407131063040; gpw_e24=http%3a%2f%2fwww.oracle.com%2ftechnetwork%2fjava%2fjavase%2fdownloads%2fjdk7-downloads-1880260.html; s_sq=%5b%5bb%5d%5d "http://download.oracle.com/otn-pub/java/jdk/7u65-b17/jdk-7u65-linux-x64.tar.gz

To configure environment variables:

The principle of configuring environment variables and Windows under Linux is the same, which is to make the path of the JDK a global variable, with the text editor gedit (if not installed can use VI) to open/etc/profile, at the end of the file to add

Export java_home=/usr/java/jdk1.6.0_45

Export path= $JAVA _home/bin: $PATH

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

Jdk1.6.0_45 change to the folder name of the JDK you installed

Log off after saving

Let the file take effect:

. /etc/profile

Test: Input Java,java-version

Linux installation JDK

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.