如何确保jnlp在64位jvm上运行
我有一个 JNLP 小程序,它在安装了 32 位和 64 位 JVM 的 64 位计算机上运行。 JNLP 必须运行在 64 位 JVM 上才能正确执行。有没有办法强制使用 64 位 JVM?
I have a JNLP applet that is run on a 64bit computer with both 32 and 64 bits JVM installed.
The JNLP must run on the 64bit JVM in order to execute correctly. Is there a way to force the use of a 64bit JVM?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用
-d64
VM 选项仅允许虚拟机以 64 位启动。否则很简单无法启动。不友好,但做好工作。在控制台模式打印:从 1.5.0 开始支持
-d64
Use
-d64
the VM option to only allow the virtual machine to start at 64bits. Other way it's simple not start. Not to friendly but make the job. In console mode print:-d64
is supported since 1.5.0请参阅此处:如何判断我是在 64 位 JVM 还是 32 位 JVM 中运行(从程序内)?
您可以使用它来检测 64 位 JVM,以及是否是不,您会显示错误消息。
See here: How can I tell if I'm running in 64-bit JVM or 32-bit JVM (from within a program)?
You can use this to detect a 64-bit JVM, and if it's not, you show an error message.
如果您使用 64 位浏览器,则使用 64 位 JVM。如果您使用 32 位浏览器(当今大多数浏览器的默认版本),则使用 32 位 JVM。例如,firefox和chrome只有32位版本(当然还有测试/开发版本但没有任何官方消息)。 Microsoft IE 是少数几个提供两个版本的浏览器之一。
您无法确保 jnlp 能够在 64 位环境中运行。但是您可以确保您的小程序代码是在正确的环境中启动的:
If you use a 64Bit Browser then the 64Bit JVM is used. If you use a 32Bit Browser (which is default for most browsers nowadays) the 32Bit JVM is used. So e.g. firefox and chrome only have 32Bit versions out there (of course there are test/develop versions out there but nothing official). Microsofts IE is one of the few offering both versions.
You can not ensure that the jnlp will run in 64 Bit environment. However you can ensure in your applet code, that is was started in the right environment: