Java Environment Building

Source: Internet
Author: User

Download the JDK's official website: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

[Email protected] local]# Mkdir-pv/usr/local/java #新建java根目录

[Email protected] local]# CD/USR/LOCAL/SRC

[Email protected] src]# wget http://download.oracle.com/otn-pub/java/jdk/8u131-b11/ D54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-i586.tar.gz? authparam=1492996665_22aa4ec92bc85d04a6451ada2203534d

[Email protected] src]# tar-zxf jdk-8u131-linux-i586.tar.gz\? authparam\=1492996665_22aa4ec92bc85d04a6451ada2203534d

[Email protected] src]# MV jdk1.8.0_131/usr/local/java/jdk1.8

[Email protected] java]# cd/usr/local/java/jdk1.8/#验证是否成功

[[email protected] jdk1.8]# ls


Vim/etc/profile #配置环境变量

Export java_home=/usr/local/java/jdk1.8

Export classpath= $CLASSPATH: $JAVA _home/lib: $JAVA _home/jre/lib

Export path= $PATH: $JAVA _home/bin: $JAVA _home/jre/bin: $HOME/bin


[[email protected] ~]# Source/etc/profile #重读配置文件, if not, restart

[Email protected] ~]# java-version #验证配置

Java Version "1.8.0_131"

Java (TM) SE Runtime Environment (build 1.8.0_131-B11)

Java HotSpot (TM) Client VM (build 25.131-b11, Mixed mode)


This article from "10,000 years too long, seize" blog, please be sure to keep this source http://zengwj1949.blog.51cto.com/10747365/1918742

Java Environment Building

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.