[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Question concerning jh_manifest



Hi Matthew,

I am currently trying to use your jh_manifest script. I have the following problem however:

The standard ant jar task creates a manifest with an empty line at the end. If I apply jh_manifest this empty line remains untouched and leads to the following MANIFEST.MF (jh_manifest added the lines starting with Main-Class and below):

"Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 4.2.3 (Ubuntu 4.2.3-2ubuntu6) (Free Software Foundation, I
 nc.)

Main-Class: com.kirkk.analyzer.textui.DOTSummary
Debian-Java-Home: /usr/lib/jvm/java-gcj
Class-Path: /usr/share/java/bcel.jar /usr/share/java/regexp.jar /usr/share/jaranalyzer/jaranalyzer.jar"

Executing "java -jar jaranalyzer-1.2.jar" then generates the following error:

Exception in thread "main" java.io.IOException: invalid manifest format
        at java.util.jar.Manifest.read(Manifest.java:225)
        at java.util.jar.Manifest.<init>(Manifest.java:69)
        at java.util.jar.JarFile.getManifestFromReference(JarFile.java:177)
        at java.util.jar.JarFile.getManifest(JarFile.java:163)

When I manually delete the empty line, the error disappears and the main class is correctly executed.

How do you work around this problem when building your jars with <jar...> + jh_manifest?

Bye,

Florian


Reply to: