在NetBeans IDE中创建一个项目的唯一一个包的jar文件
答
jar cf jar-file input-file(s)
...
* The input-file(s) argument is a space-separated list of one or more files that you want to include in your JAR file.
The input-file(s) argument can contain the wildcard * symbol. If any of the "input-files" are directories, the contents of those directories are added to the JAR archive recursively.
所以你可以只指定一个包您的路径:
jar cf <jar file name> com/companyname/package/
呃,用'jar'命令? – 2012-07-14 11:48:14
你想让jar运行吗? – plasma147 2012-07-14 11:55:30
是的,我会罐子运行。我的意思是我有一个项目与许多包。我会创建只有一个包含主包的jar。 – Mazzy 2012-07-14 12:00:17