Linux Server Configuration JDK

Source: Internet
Author: User

1. View the Java version

[Email protected] ~]# java-version
Java Version "1.8.0_121"
Java (TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot (TM) 64-bit Server VM (build 25.121-b13, Mixed mode)

2. Upload the JDK file to the specified directory and unzip

Drwxr-xr-x 8 UUCP 143 4096 Dec jdk1.8.0_121
-rw-r--r--1 root root 183246769 Apr 18:38 jdk-8u121-linux-x64.tar.gz

3. Setting Environment variables

[Email protected] ~]# Vim/etc/profile

At the top of the add: "①jre path do not miss configuration ② $PATH to put to <export path>"

Export java_home=/root/jdk1.8.0_121
Export JRE_HOME=/ROOT/JDK1.8.0_121/JRE
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export path= $JAVA _home/bin: $PATH

4. Execute profile

[Email protected] ~]# Source/etc/profile

"This allows the configuration to take effect immediately without rebooting"

5. Tomcat has its own JDK configuration

/opt/tomcat_invest/bin/setclasspath.sh

Linux Server Configuration 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.