Different Java version showing on command line

前端 未结 4 1745
灰色年华
灰色年华 2021-02-07 07:31

I have recently checked on my Java version. I ran the command java -version and I found out that I was using java version 1.7.0_09. But when I tried to

4条回答
  •  情深已故
    2021-02-07 08:19

    Adding the following will resolve your issue:

    set JAVA_HOME="your jdk path"
    set PATH=%JAVA_HOME%\bin;%PATH%.
    

    Additionally if it does not work that means you have set the PATH for multiple java versions, include only the latest one and remove all from PATH variables.

提交回复
热议问题