简体   繁体   English

Windows 7 64位,配置2个Java版本

[英]Windows 7 64-bit, Configuring 2 versions of Java

Windows 7 64bit. Windows 7 64位。 I have a web based application that needs to use the newest version of java (1.7.0.45) and I have another software install the needs java versions (1.5.0.15 & 1.4.2). 我有一个基于Web的应用程序,需要使用Java的最新版本(1.7.0.45),并且我有另一个软件需要安装Java的版本(1.5.0.15&1.4.2)。 I'm just unsure how to set the PATH/VARIABLE for this to work properly.. any help would be greatly appreciated. 我只是不确定如何设置PATH / VARIABLE使其正常工作..任何帮助将不胜感激。

I have seen several posts & answers regarding very similar situations to this, but I am just unsure how to make this work. 我已经看到了几篇有关此情况的帖子和答案,但是我不确定如何进行这项工作。

As mentioned by @Moshe here . 正如@Moshe 在这里提到的那样。

It is absolutely possible to install side-by-side several JRE/JDK versions. 绝对可以并排安装几个JRE / JDK版本。 Moreover, you don't have to do anything special for that to happen, as Sun is creating a different folder for each (under Program Files). 此外,您无需为此做任何特殊的事情,因为Sun会为每个文件夹创建一个不同的文件夹(在Program Files下)。

There is no control panel to check which JRE works for each application. 没有控制面板来检查哪个JRE适用于每个应用程序。 Basically, the JRE that will work would be the first in your PATH environment variable. 基本上,将起作用的JRE将是PATH环境变量中的第一个。 You can change that, or the JAVA_HOME variable, or create specific cmd/bat files to launch the applications you desire, each with a different JRE in path. 您可以更改它或JAVA_HOME变量,或者创建特定的cmd / bat文件来启动所需的应用程序,每个应用程序的路径中都有不同的JRE。 Just like below, 就像下面一样

 set JAVA_HOME=C:\\...\\j2dskXXX to change the JAVA_HOME environment. 

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

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