The java environment configuration is 1.8jdk, why cmd java -version checks the version is 17 or 11

 

1. Check the Path configuration in your environment variable, and confirm that %java_home%/bin is the first in the path value.

 

2. Enter echo %path% in cmd to see what the actual effective path value is. Is the java configuration correct?

 

3. Oracle also comes with a jdk. If you configure the jdk behind oracle when configuring environment variables, the system will search for the jdk of oracle by default, which will cause your configuration to have no effect at all.
 

Guess you like

Origin blog.csdn.net/s_sos0/article/details/131585984