简体   繁体   English

在 64 位 windows 2008R2 服务器上运行 32 位 JRE

[英]Running 32bit JRE on a 64bit windows 2008R2 server

I am trying to run an application called vdbench on my windows2008R2 which is a VM.我试图在我的 windows2008R2 上运行一个名为 vdbench 的应用程序,它是一个 VM。 However, the application does not have 64 bit support and can be only run with 32 bit version of Java.但是,该应用程序不支持 64 位,只能使用 32 位版本的 Java 运行。 I am trying to understand if I can install the 32 bit JRE and run the application on the windows2008R2 64 bit server?我想了解是否可以安装 32 位 JRE 并在 windows2008R2 64 位服务器上运行应用程序? I tried it but the application is not able to run saying 'java' is not recognized as a program.我试过了,但应用程序无法运行,说“java”未被识别为程序。 I am wondering if I need to map my windows2008R2 to run the specific 32bit version of JRE?我想知道我是否需要 map 我的 windows2008R2 来运行特定的 32 位版本的 JRE?

You need to do nothing except install the 32-bit JRE / JDK whatever your requirement.除了根据您的要求安装 32 位 JRE / JDK 外,您无需执行任何操作。 I do this all the time.我一直这样做。 The only real reason to use the 64-bit version is if you application needs to be able to access more than 4GB of RAM (or some programmatic lib dependency)使用 64 位版本的唯一真正原因是,如果您的应用程序需要能够访问超过 4GB 的 RAM(或某些程序库依赖项)

Make sure you install the 32-bit version and point the JAVA_HOME environment variable to the install dir so if you install JRE 1.6 it JAVA_HOME should be something like确保安装 32 位版本并将JAVA_HOME环境变量指向安装目录,因此如果您安装 JRE 1.6,则 JAVA_HOME 应该类似于
C:\Program Files (x86)\Java\jre1.6.0_XX

Also, in your Path environment variable add %JAVA_HOME%\bin to its end, this will make all the java executable's available at the command line.此外,在您的Path环境变量中将%JAVA_HOME%\bin添加到其末尾,这将使所有 java 可执行文件在命令行中可用。

In the case of a JRE you can use an environment variable called JRE_HOME if you want instead of JAVA_HOME .在 JRE 的情况下,您可以使用名为JRE_HOME的环境变量来代替JAVA_HOME

You can also add -d32 to the JVM options, which should tell the JVM to run in 32-bit mode.您还可以将 -d32 添加到 JVM 选项中,这应该告诉 JVM 在 32 位模式下运行。

You must install a 32-bit JDK or JRE.您必须安装 32 位 JDK 或 JRE。 Then, add a new system environment variable named EXE4J_JAVA_HOME pointing to the new install dir (there's no need to overwrite the JAVA_HOME env. var.).然后,添加一个名为 EXE4J_JAVA_HOME 的新系统环境变量,指向新的安装目录(无需覆盖 JAVA_HOME 环境变量)。

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

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