Java environment under Linux Setup

Source: Internet
Author: User

operating system: CentOS release 6.9 (Final)

Task: Install the configuration Java environment

[Email protected] src]# Wget 2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.tar.gz? authparam=1517116273_f97a52606c91628e0c57ea1f702b885d

[Email protected] src]# tar zxvf jdk-8u161-linux-x64.tar.gz\? authparam\=1517114251_0e387d4f537ca5e37a240f0b6c796f76

[Email protected] src]# Mkdir/usr/java #建立java目录

[Email protected] src]# cp-r jdk1.8.0_161//usr/java/jdk1.8

[email protected] java]# Vi/etc/profile #配置Java环境

Export java_home=/usr/local/jdk1.8

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

Export path= $PATH: $JAVA _home/bin

[[Email protected] ~] #java

[Email protected] ~]# Javac

-bash:javac:command not found

[email protected] ~]# yum install java-1.8.0-openjdk-devel.x86_64 #解决javac的问题

has been installed:

Java-1.8.0-openjdk-devel.x86_64 1:


Java environment under Linux Setup

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: 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.