Manifest file for executable jar

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2006
Posts: 9
Reputation: Declan123 is an unknown quantity at this point 
Solved Threads: 1
Declan123 Declan123 is offline Offline
Newbie Poster

Manifest file for executable jar

 
0
  #1
Nov 23rd, 2006
I have been trying to create an excutable jar file. When trying to added new data to the manifest file it give me an error say 'invalid header field name: |||Manifest-Version:'. Iam using the command line:

jar -cfm App.jar META-INF\MANIFEST.MF mainui\*.class

the mainfest file looks like this

Manifest-Version: 1.0
Created-By: 1.4.2_13 (Sun Microsystems Inc.)
Main-Class: mainui.MainUI

It encoding is UTF-8. Can anyone see where im going wrong here.

Cheers

Declan.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,272
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 493
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Manifest file for executable jar

 
0
  #2
Nov 23rd, 2006
I had problem with JAR sometime ago, bellow you find link to my original question and solution to it

LINK
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Manifest file for executable jar

 
0
  #3
Nov 23rd, 2006
Since your error message indicates garbage in front of "Manifest-Version", I assume your file contains garbage there.
Try recreating the manifest file from scratch, do as most people do and use ANT to make it for you
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,273
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 378
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Manifest file for executable jar

 
0
  #4
Nov 23rd, 2006
How do you use ANT to do it for you in netbeans?
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 9
Reputation: Declan123 is an unknown quantity at this point 
Solved Threads: 1
Declan123 Declan123 is offline Offline
Newbie Poster

Re: Manifest file for executable jar

 
0
  #5
Nov 24th, 2006
Thanks Peter and J, I got it working by not trying to create the manifest file first and using the (M) command, but rather let the jar app create the default one with the cf command, then extract using the xf command, then edit the manifest file and re-create the jar usinf the cfm command, i think maybe the the format UTF-8 that is supplied in notepad is not completely what the jar file is looking for in a manifest file...

Thanks again
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 5056 | Replies: 4
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC