• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Manifest file

 
Lara McCarver
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are there any pieces of data that really should be in your manifest file (the one that goes in the runme.jar file)? Currently, I have only one line, a Main-Class line, which was recommended in an SCJP/D Book (I think Sierra & Bates). When I tried to also add Manifest-Version and Created-By, I was running into errors (it couldn't find my main class), although it is possible that is because I didn't have format quite right on these. And they were declared above the Main-Class, so I supposed a formatting problem could have trickled down (??)

What I was wondering is, are you supposed to have these Manifest-Version and Created-By lines, or are they truly optional? Because if the one line is enough, I will probably leave it alone.

And what about the jar file that is used to package together everything for your exam? (The runme.jar, various documents, I think the database file and instructions too) Does this jar file need a manifest file, and if so what is supposed to be in it?

Lara
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lara,

Manifest-Version and Created-By are meant to be added to the manifest by the jar tool. You should not try to add them yourself. (In theory you could probably add them manually if you were using some non-standard tool to create the jar file (for example: zip), but why bother?)

As for the submission jar file - it does not need any manifest at all. It is just a container for all the files and has no other meaning.

Regards, Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic