Java从Eclipse导出为可运行的JAR文件

时间:2021-02-14 23:19:42

I want to export my project as runnable JAR file but when I export it, it crashes automatically... also it takes only 900 KB which is too low for my program... What should i do?

我想将我的项目导出为可运行的JAR文件,但是当我导出它时,它会自动崩溃...它只需要900 KB,这对我的程序来说太低了......我该怎么办?

1 个解决方案

#1


0  

You could run it from the commandline with

您可以使用命令行运行它

java -jar yourjarfile.jar

Is your picture located as a ressource in your project. Otherwise it's missing in the jar file and so you may got an error

您的图片是否作为项目中的资源来定位。否则它在jar文件中丢失,因此您可能会收到错误

#1


0  

You could run it from the commandline with

您可以使用命令行运行它

java -jar yourjarfile.jar

Is your picture located as a ressource in your project. Otherwise it's missing in the jar file and so you may got an error

您的图片是否作为项目中的资源来定位。否则它在jar文件中丢失,因此您可能会收到错误