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
解决方案
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:
Using eclipse
博主使用Eclipse开发Java小程序,添加外部JAR到清单文件Class - Path时出错,提示无效标题字段名。原因是用记事本保存的文件开头有UTF - 8格式标识BOM。解决方案是用Notepad++或vi编辑文件,以无BOM的UTF - 8编码保存。
112

被折叠的 条评论
为什么被折叠?



