How to change default JRE for all Eclipse workspaces?

后端 未结 11 2126
囚心锁ツ
囚心锁ツ 2020-12-05 09:30

I have one JRE in C:\\Program Files (x86)\\Java\\jre6 and that was the only one at the time I installed Eclipse. I have subsequently installed a complete JDK i

11条回答
  •  被撕碎了的回忆
    2020-12-05 10:27

    Finally got it: The way Eclipse picks up the JRE is using the system's PATH.

    I did not have C:\home\SFTWR\jdk1.6.0_21\bin in the path at all before and I did have C:\Program Files (x86)\Java\jre6\bin. I had both JRE_HOME and JAVA_HOME set to C:\home\SFTWR\jdk1.6.0_21 but neither of those two mattered. I guess Eclipse did (something to the effect of) where java (or which on UNIX/Linux) to see where Java is in the path and took the JRE to which that java.exe belonged. In my case, despite all the configuration tweaks I had done (including eclipse.ini -vm option as suggested above), it remained stuck to what was in the path.

    I removed the old JRE bin from the path, put the new one in, and it works for all workspaces.

提交回复
热议问题