[英]Executable JAR file also contains the source code
I know this question asked many times but I can't find my answer from older question .I have four packages an I want to create jar file from this packages my main program is in main package . 我知道这个问题已经问了很多遍了,但是我从旧的问题中找不到答案。我有四个软件包,我想从这个软件包中创建jar文件,我的主程序在main软件包中。 I use this statement like so : 我这样使用此语句:
jar -cvfm app.jar manifest.txt *
When I saw the content of a jar file my sources ( .java
) also exist in the jar file but I want just to have .class
file in my jar
file .How can I solve this problem? 当我看到一个罐子的内容文件我的消息来源( .java
)也存在于jar文件,但我只想拥有.class
在我的文件jar
文件我。如何才能解决这个问题呢?
You may change the command to: 您可以将命令更改为:
jar -cvfm app.jar manifest.txt *.class
You missed the .class
part. 您错过了.class
部分。 By using the wildcard *
you've included everything. 通过使用通配符*
您已包含了所有内容。
Good Luck. 祝好运。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.