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

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

问题描述

我刚刚在64位Windows 7笔记本电脑上使用Eclipse开发并导出了一个Runnable JAR。我刚刚在其他计算机上尝试过,当你双击它时,它可以在另一台Windows 7 x64笔记本电脑上运行。但是,在32位笔记本电脑上我只有在使用 java -jarC:\ 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.

此外,如果我使用命令 javawC:\ 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构建它?
也许你没有在尝试运行它的电脑上安装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天全站免登陆