CentOS Learning Note--JDK installation

Source: Internet
Author: User

JDK Installation

Most of the services are inseparable from the Java environment, CentOS is OPENJDK, obviously we still use Java JDK good. (Note: Minimal version does not have OPENJDK installed, other versions need to delete this.) )

JDK Download

Download the tar.gz version of the JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html.

Use SSH to upload to/opt.

Installation
# cd/opt # tar xzvf *.tar.gz # MV *.tar.gz JDK          < —--"*" is the version of the JDK you download, here is a lot of characters to the JDK, look comfortable, do not change, note the following configuration
Configure system settings

Add at the end of the/etc/profile file

Export java_home=/opt/JDK   <---Here is the installation directory for your JDK, with the MV modified above, you need to write the whole bunch of characters here       export PATH=$JAVA _ HOME/bin:$PATHexport CLASSPATH=.:$JAVA _home/lib/dt.jar:$JAVA _home/lib/ Tools.jar

Execute the command that makes the configuration information effective immediately source

# source/etc/profile//This command is for the configuration to take effect immediately. 
Test
# Java–version <---Displaying Java version information indicates that the JDK installation is complete

CentOS Learning Note--JDK installation

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.