如何递归中所有的sub文件夹中的所有 *。
“主要”方法在application \ program.class
我可以通过以下方式生成jar file:
jar cvfe PwdGen.jar Application.Program Application\*.class Info\*.class
但是,如果我有更多的目录,则必须添加更多“ direcotory \*。类”附加命令。
是否有一种简单的方法可以包含全部(包括子文件夹) *。
"main" method is in Application\Program.class
I can generate the jar file by:
jar cvfe PwdGen.jar Application.Program Application\*.class Info\*.class
But if I have more directory with more class, I have to add more "direcotory\*.class" attach to the back of command.
Is there a simple way to include all (include sub folders) *.class recursively once for all?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以尝试使用以下命令为多个目录创建JAR。
You could try using the below command to create a jar for multiple directories.
包括子文件夹的一种合理的简单方法是按级别定义一个参数:
如果应用程序中有子文件夹,则将包括在内。如果这些子文件夹有子文件夹,则必须写作:
您必须做同样的信息以获取信息。
在这里请注意一个非常有趣的答案:
如何使用包装结构创建JAR文件?
注意点到底。这将复制完整的结构,而不仅仅是.class文件。我尚未找到只能复制.class文件的语法。
A reasonably simple way of including subfolders is to define one parameter by level :
If there are subfolders in Application, they will be included. If these subfolders have subfolders, then you will have to write :
And you have to do the same for Info.
Note a very interesting answer here :
How to create jar file with package structure?
Note the dot in the end. This will copy the full structure, not only the .class files. I have not found a syntax which will copy only the .class files.