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

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

问题描述

所以我有一些第三方的本机库只能在Windows,osx,linux的32位JVM中工作,我需要总是强制执行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?

推荐答案

否。

您指定的前提条件禁止,我排除了捆绑的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位版本的第三方库

  • Require the 32-bit JVM to be installed
  • Bundle the 32-bit JVM (the three OS's - that'll be a pretty big burden)
  • Install the 32-bit JVM for the user
  • Use a different third party library / roll your own / find a 64-bit version of the third party library

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

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