[英]possible to force a 64-bit JVM to use 32-bit mode via the argument “-d32”?
so I have some 3rd party native library that works only in 32 bit JVM across windows,osx,linux and I need to always enforce the java application to run in 32 bit JVM mode. 所以我有一些第三方本机库只能在Windows,osx,linux上的32位JVM中工作,我需要始终强制java应用程序以32位JVM模式运行。
What about if the target system only has 64-bit JVM installed, would it be possible to force it to run the java application in 32 bit mode? 如果目标系统只安装了64位JVM,是否可以强制它以32位模式运行java应用程序呢?
No. 没有。
The preconditions that you specified prohibit (okay, I'm precluding the bundle-the-JVM solution and install-the-JVM solution) the application from running in a 32-bit JRE. 您指定的前提条件禁止(好的,我正在排除bundle-the-JVM解决方案并安装-JVM解决方案)应用程序在32位JRE中运行。 If you want to run your application in a 32-bit JVM, and your third party native library is only available as a 32-bit DLL, then you must use a 32-bit JVM. 如果要在32位JVM中运行应用程序,并且第三方本机库仅作为32位DLL提供,则必须使用32位JVM。 A 64-bit JVM cannot load the 32-bit library; 64位JVM无法加载32位库; there is no 32-bit mode to load such libraries. 没有32位模式来加载这些库。
Solutions include: 方案包括:
With Java 6, no. 使用Java 6,没有。 With Java 7+, yes. 使用Java 7+,是的。
Use -d32 with Java 7 在Java 7中使用-d32
possible to force a 64-bit JVM to use 32-bit mode via the argument “-d32”? 可以通过参数“-d32”强制64位JVM使用32位模式?
As there is no such argument to the java
command, the answer is obviously 'no'. 由于java
命令没有这样的参数,答案显然是“不”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.