java.exe always point to the path of JRE but not JDK

前端 未结 5 1509
臣服心动
臣服心动 2021-01-02 11:33

I have both jdk and jre installed on my windows 7.

I have set the JAVA_HOME to

C:\\Program Files\\Java\\jdk1.6.0_23

I have add

5条回答
  •  执念已碎
    2021-01-02 12:24

    since you are on windows, java doesn't work like that. there is a java.exe in some windows directory (%windir% system32 for you)

    This java.exe actually looks in the registry HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment

    PATH won't help ya! Since I tend to get lazy I delete the JRE and create a junction to the JDK instead.

提交回复
热议问题