0

I have java jre7 installed and also jre6, but the current version that is in use is the jre7. How do I tell windows to use the jre6 instead of 7? I've seen some guides of how to do so but it seems that they related to winXP since they were dealing with the JAVA_HOME variable (which does not exist on win7).

I've tried to add the path of the bin folder of the jre6 to the PATH environment variable but it didn't work. Do you have any other ideas?

By the way - I do want my eclipse to run the jre7, so I figured out I need to add/change lines in the eclipse.ini file, what exactly do I need to do there?

Thanks in advance, Guy

1 Answers1

0

Like on other windows versions (and by the way like on linux too), you have to set the JAVA_HOME environment variable.

If this var doesn't exist yet, it simply means you have to create it.

Here's how you can set an env variable on Win7 : http://www.windows7hacker.com/index.php/2010/05/how-to-addedit-environment-variables-in-windows-7/

For Eclipse, go in the preferences, choose java/installed JREs and choose the one you want. But for most of your other java based programs, the JAVA_HOME is really the important variable (along with the PATH).

Denys Séguret
  • 372,613
  • 87
  • 782
  • 758