marzie
marzie

Reputation: 203

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 . 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?

Upvotes: 1

Views: 235

Answers (1)

STaefi
STaefi

Reputation: 4377

You may change the command to:

jar -cvfm app.jar manifest.txt *.class

You missed the .class part. By using the wildcard * you've included everything.

Good Luck.

Upvotes: 2

Related Questions