Manifest Problem

Hi guys...

have you encountered this error in building a jar file?

building batch file....

java.io.IOException: line too long

at java.util.jar.Attributes.read(Attributes.java:362)

at java.util.jar.Manifest.read(Manifest.java:167)

at java.util.jar.Manifest.<init>(Manifest.java:52)

at sun.tools.jar.Main.run(Main.java:123)

at sun.tools.jar.Main.main(Main.java:903)

finish building batch file.

Press any key to continue . . .

i have a lot of jaar dependencies so i have to put them all in the classpath in the manifest file...and this is the source of the error...

Any idea on how to remedy the problem? Need you help asap...

Thanks in advance :)

[732 byte] By [kneelmara] at [2007-11-27 11:37:31]
# 1

how many lines are in your manifest file, lol?

TuringPesta at 2007-7-29 17:14:58 > top of Java-index,Java Essentials,Java Programming...
# 2

This is covered by the JAR File Specification, in the section "Notes on Manifest and Signature Files":

"No line may be longer than 72 bytes (not characters), in its UTF8-encoded form. If a value would make the initial line longer than this, it should be continued on extra lines (each starting with a single SPACE). "

So in other words, break up your classpath entry into several lines, and make sure that each new line starts with a space.

You can read all of it here:

http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html

Torgila at 2007-7-29 17:14:58 > top of Java-index,Java Essentials,Java Programming...
# 3

thanks Torgil....it solved the problem

kneelmara at 2007-7-29 17:14:58 > top of Java-index,Java Essentials,Java Programming...