是否可以通过参数“-d32"强制 64 位 JVM 使用 32 位模式? [英] possible to force a 64-bit JVM to use 32-bit mode via the argument "-d32"?

查看:28
本文介绍了是否可以通过参数“-d32"强制 64 位 JVM 使用 32 位模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一些 3rd 方本机库,它只能在 32 位 JVM 中跨 windows、osx、linux 运行,我需要始终强制 Java 应用程序在 32 位 JVM 模式下运行.

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.

如果目标系统只安装了 64 位 JVM,是否可以强制它以 32 位模式运行 java 应用程序?

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?

推荐答案

没有

您指定的先决条件禁止(好吧,我排除了 bundle-the-JVM 解决方案和 install-the-JVM 解决方案)应用程序在 32 位 JRE 中运行.如果您想在 32 位 JVM 中运行您的应用程序,而您的第三方本机库仅作为 32 位 DLL 提供,那么您必须使用 32 位 JVM.64 位 JVM 无法加载 32 位库;没有 32 位模式可以加载此类库.

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. 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. A 64-bit JVM cannot load the 32-bit library; there is no 32-bit mode to load such libraries.

解决方案包括:

  • 需要安装 32 位 JVM
  • 捆绑 32 位 JVM(三个操作系统 - 这将是一个相当大的负担)
  • 为用户安装 32 位 JVM
  • 使用不同的第三方库/自行创建/查找第三方库的 64 位版本

这篇关于是否可以通过参数“-d32"强制 64 位 JVM 使用 32 位模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆