如何制作一个可运行的jar文件? [英] How to make a runnable jar file?
本文介绍了如何制作一个可运行的jar文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的程序制作了可运行的.jar文件..我现在发现的所有程序都是制作.exe文件的程序..我记得它也可以选择使文件成为.sh脚本同样。谁知道它的名字?我一直在寻找无利可图的时间:/
There was a program that I used that made runnable .jar files.. All the ones I'm finding now are ones that make .exe files.. I remember it also has the option to make the file a .sh script as well. Anyone knows its name? I've been searching for hours with no avail :/
推荐答案
命令行
java -jar file.jar
将运行你的jar文件,如果它有<$ h $ => http://docs.oracle.com/javase/tutorial/deployment/jar/定义的 Main-Class
appman.htmlrel =nofollow>这里。
Will run your jar file if it has a Main-Class
defined as explained here.
您可以在shell脚本中使用该命令。
You can use that command in a shell script.
这篇关于如何制作一个可运行的jar文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文