wood burning stoves*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes MANIFEST needed in submission.jar? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "MANIFEST needed in submission.jar?" Watch "MANIFEST needed in submission.jar?" New topic
Author

MANIFEST needed in submission.jar?

Andy Jung
Ranch Hand

Joined: Feb 07, 2010
Posts: 150
Hi all,

when packaging all the stuff in the submission.jar a default MANIFEST is created.
Is this really needed for submission.jar or can it also be deleted?

Kind regards,
Andy

SCJP, SCJD
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5597
    
  15

I didn't delete it from my submission jar


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Raf Szczypiorski
Ranch Hand

Joined: Aug 21, 2008
Posts: 383
One of my requirements was to be able to call the application with 'java -jar runme.jar [mode]'. I believe that I must have the manifest with the Main-Class set correctly. Maybe you have the same requirement?
Andy Jung
Ranch Hand

Joined: Feb 07, 2010
Posts: 150
Raf Szczypiorski wrote:Maybe you have the same requirement?


... yes, I have the same requirement. For runme.jar a MANIFEST is needed, since it is an executable, but this is apparently not true for submission.jar, which contains the runme.jar and all other documents just for submission purposes.
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5597
    
  15

Hi Raf,

You must create 2 jars: a runme.jar and a submission jar. The 1st one will have to be execute with the -jar option, so that one will need a MANIFEST indicating the main class. Not providing it, will lead to automatic failure, because your runme.jar becomes quiet useless. For the submission jar (containing all the files needed for your submission) a MANIFEST is not needed, so you can delete it.

Kind regards,
Roel
Raf Szczypiorski
Ranch Hand

Joined: Aug 21, 2008
Posts: 383
Ahh true. I haven't got to that part, yet. Sorry for the confusion.
Andy Jung
Ranch Hand

Joined: Feb 07, 2010
Posts: 150
... no problem at all
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2268
    
    3

I just kept the MANIFEST.MF file in the runme.jar file and deleted the MANIFEST.MF file from the submission.jar file (it wasn't this name back then, but still ).


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MANIFEST needed in submission.jar?