简体   繁体   English

在Windows 7(32位)上配置jre版本

[英]configure the jre version on windows 7 (32 bit)

I have java jre7 installed and also jre6, but the current version that is in use is the jre7. 我安装了Java jre7,也安装了jre6,但是当前使用的版本是jre7。 How do I tell windows to use the jre6 instead of 7? 如何告诉Windows使用jre6而不是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). 我已经看到了一些有关如何执行此操作的指南,但由于它们正在处理JAVA_HOME变量(在win7上不存在),因此它们似乎与winXP有关。

I've tried to add the path of the bin folder of the jre6 to the PATH environment variable but it didn't work. 我试图将jre6的bin文件夹的路径添加到PATH环境变量中,但是它不起作用。 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? 顺便说一句-我确实希望我的eclipse运行jre7,所以我发现我需要在eclipse.ini文件中添加/更改行,在那里我到底需要做什么?

Thanks in advance, Guy 预先感谢,盖伊

Like on other windows versions (and by the way like on linux too), you have to set the JAVA_HOME environment variable. 像在其他Windows版本上一样(顺便说一句,在Linux上也一样),您必须设置JAVA_HOME环境变量。

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/ 这是在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. 对于Eclipse,进入首选项,选择java/installed JREs然后选择所需的java/installed JREs But for most of your other java based programs, the JAVA_HOME is really the important variable (along with the PATH). 但是对于大多数其他基于Java的程序,JAVA_HOME确实是重要的变量(以及PATH)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM