巴扎黑2017-04-18 09:17:52
java -version is the command line statement of java. JAVA_HOME is the java environment path
PHP中文网2017-04-18 09:17:52
What you need to look at is not java_home but the directory of /bin/java that appears first in the path variable
Understand the search order
First search from the current directory
If you can’t find it, search it from the directory in the current path variable. If you find it, call and return
巴扎黑2017-04-18 09:17:52
1.JAVA_HOME is the path to the jdk that you set in path. echo %java_home%
就是打印 jdk所在路径.
2.java -version
is the version of java that is printed, which is the command line statement of java.