java -version and javac -version showing different versions

后端 未结 9 1843
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-03 01:29

I have java 7 and java 8 both installed on my windows system under C:\\Program Files\\Java

In the environment\'s path I specif

9条回答
  •  攒了一身酷
    2020-12-03 01:30

    Check your JAVA_HOME variable under environment variables in Windows machine. Make sure It is pointing to the version that you want. Next check java jdk path added into your "path" environment variable. Make sure It is the version that you want, Otherwise change this to your JDK version path and then move this to the top of the list of values in path variable. This should mark your desired version as the first choice and all issues will be resolved. I did so, and everything is good.

提交回复
热议问题