943,940 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 6709
  • Java RSS
Nov 23rd, 2006
0

Manifest file for executable jar

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Declan123 is offline Offline
9 posts
since Oct 2006
Nov 23rd, 2006
0

Re: Manifest file for executable jar

I had problem with JAR sometime ago, bellow you find link to my original question and solution to it

LINK
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 873
Code tags enforcer
peter_budo is offline Offline
6,656 posts
since Dec 2004
Nov 23rd, 2006
0

Re: Manifest file for executable jar

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
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Nov 23rd, 2006
0

Re: Manifest file for executable jar

How do you use ANT to do it for you in netbeans?
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
Nov 24th, 2006
0

Re: Manifest file for executable jar

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
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Declan123 is offline Offline
9 posts
since Oct 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: store table values into database which are updated dynamically on JSP page
Next Thread in Java Forum Timeline: Incompatible types error





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC