简体   繁体   English

可执行 Jar 文件无法在另一台机器上运行

[英]Executable Jar file not working another machine

I have created an executable jar file to my java programm using Eclipse(File->Export).我使用 Eclipse(文件->导出)为我的 java 程序创建了一个可执行的 jar 文件。

When i double click the jar it works fine.After i copy the jar file to another machine(windows) i got an error "Invalid or corrupt jarfile".I have installed JRE and JVM.当我双击 jar 时,它工作正常。在我将 jar 文件复制到另一台机器(Windows)后,我收到一个错误“无效或损坏的 jarfile”。我已经安装了 JRE 和 Z18B5A217C4DAD25669EDB7D3E0

Anybody know what is the issue.任何人都知道是什么问题。 Help is highly appreciated.高度赞赏帮助。

Thanks, vks谢谢,vks

as you said you have double click try command line as another machine(windows) might not be assign jar extension to execute.正如您所说,您可以double click尝试命令行,因为另一台机器(Windows)可能没有分配jar扩展名来执行。 to run jar manually do.手动运行 jar。

java -jar example.jar

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM