在 64 位 Windows 上编译的 JAR 不会在 32 位上运行 [英] JAR compiled on 64 bit Windows wont run on 32 bit

查看:48
本文介绍了在 64 位 Windows 上编译的 JAR 不会在 32 位上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在我的 64 位 Windows 7 笔记本电脑上使用 Eclipse 开发并导出了一个 Runnable JAR.我刚刚在其他计算机上尝试过它,当您双击它时,它可以在另一台 Windows 7 x64 笔记本电脑上运行.但是,在 32 位笔记本电脑上,如果我使用 java -jar "C:Name of Jar.jar" 从命令行运行它,我只会启动它,但不会引发任何错误.

I have just developed and exported a Runnable JAR using Eclipse on my 64 Bit Windows 7 Laptop. I have just been trying it on other computers and it works on another Windows 7 x64 laptop when you double click it. However, on a 32 Bit laptop I have in only starts if I run it from command line using java -jar "C:Name of Jar.jar" but throws no errors whatsoever.

此外,如果我使用命令 javaw "C:Name Of Jar.jar" 我收到一条错误消息说找不到主类 C:Name of Jar.jar. 程序将会退出."

Furthermore though, if I use the command javaw "C:Name Of Jar.jar" I get an error message saying "Could not find the main class C:Name of Jar.jar. Program will exit."

有谁知道为什么,以及如何解决它?提前致谢

Does anybody know why, and how to fix it? Thanks in advance

推荐答案

您是使用 JDK 1.7 构建的吗?也许您还没有在尝试运行它的 PC 上安装 JRE7.这是我遇到过几次的奇怪错误.

Did you build it with JDK 1.7? Maybe you haven't installed JRE7 on the pc you try to run it. It's an odd bug I encountered several times.

这篇关于在 64 位 Windows 上编译的 JAR 不会在 32 位上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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