如何在不同的计算机上打开导出的.exe Jar文件或RUN.bat文件?

时间:2021-03-01 16:02:06

I recently made a game and trying to distribute to my friends.

我最近做了一个游戏,并试图分发给我的朋友。

I exported .exe Jar file in Eclipse, and tried to open it to see if it works, but somehow it didn't so I had to manually make RUN.bat file, and it worked. So I zipped those two files together and send it to my friends. But they all said the neither file does not work.

我在Eclipse中导出了.exe Jar文件,并尝试打开它以查看它是否有效,但不知何故它没有这样我必须手动制作RUN.bat文件,并且它有效。所以我将这两个文件压缩在一起并发送给我的朋友。但他们都说这两个文件都不起作用。

The error message is this : "It is not an internal or external command, executable program, or batch file."

错误消息是:“它不是内部或外部命令,可执行程序或批处理文件。”

So it worked in my computer and it didn't work when it was in other computers. How could I resolve the problem? Is it because they didn't have Eclipse? Is there any way they can run without having Eclipse or anything?

所以它在我的电脑上工作,当它在其他电脑上时它不起作用。我怎么能解决这个问题?是因为他们没有Eclipse吗?有没有什么方法可以在没有Eclipse或任何东西的情况下运行?

1 个解决方案

#1


2  

Your batch problably is using java -jar in your .bat, and your friends does not have JRE installed

您的批处理可能是在.bat中使用java -jar,而您的朋友没有安装JRE

#1


2  

Your batch problably is using java -jar in your .bat, and your friends does not have JRE installed

您的批处理可能是在.bat中使用java -jar,而您的朋友没有安装JRE