加入清单使用Eclipse JAR时无效标头字段名称 [英] Invalid Header Field Name when adding manifest to JAR using Eclipse
问题描述
我使用Eclipse来开发一个Java小程序,需要一个外部的jar在清单添加到类路径。我创建使用记事本清单文件,使用UTF-8编码,并添加结尾的断行,但在尝试过程中,从Eclipse中下面的错误罐子创作结果添加甚至一个简单的例子清单。
无效的头字段名称:I>¿清单-版本
无效的头字段名称:I>¿清单-版本
我有一种感觉,这是一些简单的配置问题,但我想不出什么。
要测试它,我的清单由单行的
清单-版本:1.0
记事本保存了专用标志名为BOM开头:2个字节(U + FEFF)中识别UTF-8格式
您有记事本+ + (或VI)和EN $ C $编辑该文件c将其作为UTF-8(无BOM)。
接下来的步骤,使JAR文件:
- 使用Eclipse
- 使用 Apache Ant的
- 使用的Apache Maven的
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
- Using Apache ANT
- Using Apache Maven
这篇关于加入清单使用Eclipse JAR时无效标头字段名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!