Linux view Java JDK installation path and set environment variables

Source: Internet
Author: User

One: View type windows:set java_home: View JDK Installation path Java-version: View JDK version Linux:whereis Javawhich java (Java execution path) echo $ Java_homeecho $PATH

Two: Here are the environment variables for configuring Linux: (Remember source. bash_profile)1. Modify/etc/Profile file (global all users) vi this file/etc/Profile added at the end of the Profiles file: Export Java_home=/usr/share/jdk1.6.0_20export path= $JAVA _home/Bin: $PATHexport classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/Tools.jar26.0_20export Path= $JAVA _home/bin: $PATHexport classpath=.: $JAVA _home/lib/ Dt.jar: $JAVA _home/lib/tools.jar3.shell Terminal executes the following command: (temporary) export Java_home=/usr/share/jdk1.6.0_14export path= $JAVA _home/bin: $PATHexport classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/ tools.jar          
Three. Uninstall JDK find the _uninst subdirectory of the JDK installation directory • Execute commands at the shell terminal./uninstall.sh You can uninstall the JDK.

Linux view Java JDK installation path and set environment variables

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.