Java 在 Windows 64 位平台上安装 32 位 JRE
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2847657/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Install a 32-bit JRE on Windows 64-bit platform
提问by Daniel Rikowski
I have a Windows 2008 64-bit server and I have to install a 32-bit JRE, because my Java application uses 32-bit DLLs using JNI.
我有一个 Windows 2008 64 位服务器,我必须安装一个 32 位 JRE,因为我的 Java 应用程序使用使用 JNI 的 32 位 DLL。
Unfortunately the java.exe
is installed to C:\Windows\SysWow64
and when I start a console window or a batch file the installed java.exe
is not found. (Because cmd.exe
is a 64-bit application and sees the 64-bit version of the system directory which has no java.exe
)
不幸的java.exe
是C:\Windows\SysWow64
,当我启动控制台窗口或批处理文件时,java.exe
未找到已安装的文件。(因为cmd.exe
是 64 位应用程序,看到 64 位版本的系统目录没有java.exe
)
How can I make the installed java.exe
available to batch files and the command line without to much messing around with the system configuration, causing other problems or preventing future updates to the JRE?
如何使已安装的java.exe
文件可用于批处理文件和命令行,而不会过多地干扰系统配置、导致其他问题或阻止将来对 JRE 进行更新?
采纳答案by Jesper
Don't rely on the java.exe
that's in a Windows system directory; add the bin
directory of your Java runtime environment to the PATH
environment variable (if that's not too much "messing around with the system configuration").
不要依赖java.exe
Windows 系统目录中的那个;将bin
您的 Java 运行时环境的目录添加到PATH
环境变量中(如果这不是太多“与系统配置混淆”的话)。
回答by Sunil Manheri
Known issues when you install a 32 -bit JRE on a 64- bit Windows architecture machine:
在 64 位 Windows 架构机器上安装 32 位 JRE 时的已知问题:
- Online Installation and Java Update features are not applicable to 64-bit architecture
- The public JRE installed with the 32-bit JRE is not registered. You must set the PATH environment variable to point to JAVA_HOME \bin to register the JRE
- 在线安装和 Java 更新功能不适用于 64 位架构
- 与 32 位 JRE 一起安装的公共 JRE 未注册。您必须将 PATH 环境变量设置为指向 JAVA_HOME \bin 才能注册 JRE
http://www.oracle.com/technetwork/java/javase/install-windows-64-142952.html
http://www.oracle.com/technetwork/java/javase/install-windows-64-142952.html