Linux JDK environment variable configuration

Source: Internet
Author: User

I. wget command download JDK wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gztwo. Extracting FilesTAR-ZXVF jdk-8u111-linux-x64.tar.gz three. Set environment variables (three ways)The first type is configured in/usr/profile:Vi/usr/profileExprot java_home=/usr/local/jdk1.8.0_111
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Exprot path= $JAVA _home/bin: $PATH

Source/usr/profile Making changes effective

The second is configured in the current user's. Bash_profile (root user in/root):

Operation is the same as the first method

We need source/usr/profile .

The third current shell is set directly below

Four, to see if the command was executed successfully Java-version

Uninstalling the JDK
_uninst subdirectory of the JDK installation directory
The shell terminal executes the command ./uninstall.sh

Note: If you encounter the source is not good to make recommendations to check your own configuration of the code if there is a problem (typos or something)

Linux JDK environment variable configuration

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.