After modifying JAVA_HOME, the java version version does not change

     After modifying JAVA_HOME in the win 7 environment, execute: java -version on the command line and find that the version has not changed. Thinking that it needs to be restarted, I restarted the computer. As a result, after restarting, execute: java -version The version still does not change.

 

      Execute the command where java on the command line and print the following information:

 

[java]  view plain copy  
  1. C:\Users\wck>where java  
  2. C:\ProgramData\Oracle\Java\javapath;  
  3. C:\Windows\System32\java.exe  
  4. D:\jdk1.7.0_80\bin\java.exe  

  Looking at the path, it turns out that after the Oracle database is installed in the system, the jdk used by oracle is written to the path, so that JAVA_HOME is configured earlier, but when java searches for jdk, it is searched from front to back, so that the JDK configured by JAVA_HOME cannot always be found. , modify the path configuration, and set the JAVA_HOME path to the front (just in front of the java that can be retrieved)%JAVA_HOME%\bin; After this configuration, the problem is solved.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326006962&siteId=291194637