Issue
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 in C:\home\SFTWR\jdk1.6.0_21
and changed my JAVA_HOME
environment variable to that. However, every time I start a new Eclipse workspace, it only picks up the old JRE and I have to manually remove it and add the new one.
How do I bind my Eclipse install to the new JDK so that every new workspace points to that only? I checked eclipse.ini
but there was no reference there to which JRE to go to.
UPDATE:
I went into Prefs->Java->Installed JRE
s, added the new location, marked it as default, removed the other, and it was effective only for the current workspace. However, when I opened a new workspace, only the old JRE was available. So this didn't change the core Eclipse config that is applicable across all (at least new) workspaces
Solution
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.
Answered By - amphibient
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.