我会创建一个只属于我项目的一个包的jar。这个软件包包含一个主类。我可以做什么?
答案 0 :(得分:1)
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/