在32位JVM中启动一个带有双击的jar,但是在64位JVM中从控制台启动 [英] Starting a jar with double click starts in 32bit JVM, but from console in 64bit JVM

查看:452
本文介绍了在32位JVM中启动一个带有双击的jar,但是在64位JVM中从控制台启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我使用本机库,我有32位和64位平台的不同JAR。
现在当系统上安装了两个JVM时,一个32位和一个64位我面临着这种行为:

Since I'm using native libraries I have different JARs for 32bit and 64bit platforms. Now when there are two JVMs installed on the system, one 32bit and one 64bit I face this behaviour:

双击32位JAR - >工作

Double clicking the 32bit JAR -> works

双击64位JAR - >应用程式无法启动

Double clicking the 64bit JAR -> App doesn't start

从控制台启动32位JAR - >错误:此Java实例不支持32位JVM。请安装所需的版本。

Starting the 32bit JAR from console -> Error: This Java instance does not support a 32-bit JVM.Please install the desired version.

从控制台启动64位JAR - >正常工作

在Mac上,我可以从控制台启动32位JAR,到命令。但在Windows上,这不起作用。

On Mac I can start the 32bit JAR from console, when adding -d32 to the command. But on Windows, this doesn't work.

我预计,在安装64位JVM的系统上,JAR应该从64位JVM启动,无论

I expect, that on a system, where a 64bit JVM is installed, the JAR should start in 64bit JVM, no matter if started by double click or via console.

我有办法做到吗?

推荐答案

检查 PATH 环境变量指向的位置。我想你会发现它指向你的64位JVM,而不是与 .jar 文件相关联的默认应用程序,这可能是一个32位JVM你的系统。对齐这两个值,你应该很好。

Check where the PATH environment variable points to. I think you will find that it points to your 64-bit JVM, as opposed to the default application associated with .jar files, which will probably be a 32-bit JVM on your system. Align those two values, and you should be fine.

这篇关于在32位JVM中启动一个带有双击的jar,但是在64位JVM中从控制台启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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