pLiKT
pLiKT

Reputation: 130

Invalid Header Field Name when adding manifest to JAR using Eclipse

I'm using eclipse to develop a java applet and need to add an external jar to Class-Path in the manifest. I created the manifest file using notepad, used UTF-8 encoding and added the line break at the end, but attempting to add even a simple example manifest during jar creation results in the following error from Eclipse.

invalid header field name: ï>¿Manifest-Version
invalid header field name: ï>¿Manifest-Version

I have a feeling that it's some simple configuration issue, but I can't figure out what.

To test it, my manifest consists of the single line

Manifest-Version: 1.0

Upvotes: 6

Views: 10828

Answers (3)

user957654
user957654

Reputation:

In Notepad++ , from the encoding menu , choose encode in UTF-8 without BOM .

Upvotes: 1

Leandro Lima
Leandro Lima

Reputation: 1

In eclipse, right click in file properties and choose text file encoding to ISO-8859-1

Back in editor delete the special chars.

Upvotes: 0

Aubin
Aubin

Reputation: 14863

Notepad save your file with a special mark named 'BOM' at the beginning : 2 bytes (U+FEFF) which identify UTF-8 format.

You have to edit the file with Notepad++ (or vi) and encode it as UTF-8 (without BOM).

Next steps to make JARs:

Upvotes: 8

Related Questions