Question concerning jh_manifest
- To: debian-java@lists.debian.org
- Cc: Matthew Johnson <mjj29@debian.org>
- Subject: Question concerning jh_manifest
- From: Florian Grandel <jerico.dev@gmail.com>
- Date: Fri, 04 Jul 2008 00:38:28 -0300
- Message-id: <[🔎] 486D9B34.9060406@gmail.com>
- In-reply-to: <20080630144144.GW8038@matthew.ath.cx>
- References: <485BCA40.60705@gmail.com> <726315b10806240939y2e8fa245heeb58e1d78f03c15@mail.gmail.com> <20080624170551.GH8038@matthew.ath.cx> <726315b10806291504j22e70c94h13ac4215aa54b347@mail.gmail.com> <20080629225652.GR8038@matthew.ath.cx> <20080630055809.GB5396@quadriga.konqueror.de> <726315b10806292325r6e5ddf37yd651f5829d8a086e@mail.gmail.com> <4868D913.4070306@gmail.com> <20080630132645.GV8038@matthew.ath.cx> <4868EB28.1070303@gmail.com> <20080630144144.GW8038@matthew.ath.cx>
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: