java.io.IOException: line too long
在打jar包时,manifest.mf中所依赖的所有jar路径过长,结果报错说 IOException("line too long")
java.io.IOException: line too long
at java.util.jar.Attributes.read(Attributes.java:362)
at java.util.jar.Manifest.read(Manifest.java:182)
at java.util.jar.Manifest.<init>(Manifest.java:52)
at sun.tools.jar.Main.run(Main.java:132)
at sun.tools.jar.Main.main(Main.java:1022)
java.util.jar.Attributes.read方法里,每行读入的数据是有byte限制的,在JDK6中的限制是512byte,
Java代码
// Line buffer
byte[] lbuf = newbyte[512];
// Line bufferbyte[] lbuf = new byte[512];
解决办法:
换行然后在新行前面加2个空格
标签:java,jar,long,Manifest,util,IOException,too,Main From: https://blog.51cto.com/u_9716826/6235227