The name "Manifest.txt" means ... nothing
The name "Manifest.txt" actually has no special meaning. You
could call it "George" and everything would work out fine, as
long as it's in the right place on the "jar" command's arguments.
So you could have files ManifestA.txt and ManifestB.txt that
refer to different "Main-Class"s, like this
| ManifestA.txt | ManifestB.txt | Warning! |
Main-Class: Dog | Main-Class: Cat |
Make sure there is a newline after the
class name!
|
and give the commands
jar cfm Foo.jar ManifestA.txt *.class
and
jar cfm Bar.jar ManifestB.txt *.class
and everything would be fine.
The command
java -jar Foo.jar
would run the program starting with Dog's "main" method, and the
command
java -jar Bar.jar
would run the program starting with Cat's "main" method.
So in the context of this project, you can have a manifest for
making the Part 6 jar file, and another one for making the Extra
Credit jar file, and they can both sit in the same directory and
not interfere with one another.