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