java -version and javac -version showing different versions

后端 未结 9 1854
佛祖请我去吃肉
佛祖请我去吃肉 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:56

    I guess when you are writing javac, it is getting the value from jre7 which is currently being used by you for development purposes and when you write java version, it is getting the value of the version from the jre8 which is currently being used by the installed applications on your system because your JRE of the system is mentioned before the jre7 which you are using for development

提交回复
热议问题