IOException:'无效的标头字段;使用清单创建.jar文件时 [英] IOException: 'Invalid header field; when creating .jar file with manifest

查看:101
本文介绍了IOException:'无效的标头字段;使用清单创建.jar文件时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在命令提示符下键入jar cvfm file_name.jar manifest.txt * .class时,出现此错误:

When I type jar cvfm file_name.jar manifest.txt *.class in command prompt I get this error:

java.io.IOException: invalid header field
    at java.util.jar.Attributes.read(Attributes.java:410)
    at java.util.jar.Manifest.read(Manifest.java:199)
    at java.util.jar.Manifest.<init>(Manifest.java:69)
    at sun.tools.jar.Main.run(Main.java:172)
    at sun.tools.jar.Main.main(Main.java:1177)

我从来没有此错误之前,我找不到任何错误,这是什么意思?

I've never gotten this error before and I can't find anything on it, what does it mean?

推荐答案

检查标头变量的名称在清单文件中。清单文件不正确。

Check the name of a header variable in the MANIFEST file. MANIFEST file is not correct.

本教程将帮助您识别清单文件格式和相关内容, http://docs.oracle.com/javase/tutorial/deployment/jar/manifestindex.html

This tutorial will help to identify the MANIFEST file format and related things, http://docs.oracle.com/javase/tutorial/deployment/jar/manifestindex.html

这篇关于IOException:'无效的标头字段;使用清单创建.jar文件时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆