Did something change in the generation of jar files between 1.4.1 and
1.5.0? With 1.4.1, I can successfully create a jar with a manifest.
In 1.5.0, using the same jar command, the .jar file is created, but the
Class-Path entry is not in the jar's manifest file. Here's the command
and the Manifest File that I'm using:
\jdk5\bin\jar -cmf ServerManifest U:\SourceGenArea\Server\MyServe.jar
tfg\*.class
Manifest-Version: 1.0
Class-Path: fop.jar
With 1.4.1, here's the Manifest.mf that ends up in the MyServe.jar
file:
Manifest-Version: 1.0
Class-Path: fop.jar
Created-By: 1.4.1_02 (Sun Microsystems Inc.)
With 1.5.0, here's the Manifest.mf that ends up in the MyServe.jar
file:
Manifest-Version: 1.0
Created-By: 1.5.0_05 (Sun Microsystems Inc.)
As you can see, the Class-Path is missing.
Thanks.
Bill Dennis
Roedy Green - 16 Jan 2006 21:37 GMT
>Did something change in the generation of jar files between 1.4.1 and
>1.5.0?
1. let ANT handle it.
2. My understanding it is up to you to build a template manifest if
you want a Class-Path.
3. A Class-Path that specifies just one jar is the same as no
Class-Path at all, so long as you don't rename the jar. So it best to
leave it out.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
wjdennis@rmi.net - 16 Jan 2006 23:33 GMT
Sorry, there's actually more than one jar in the Class-Path. I just
left out the extra ones to make my message shorter. The actual file
contains about 10 of them. But I've tried generating with 1, with 2,
with 5 and with all 10, but still the Class-Path doesn't end up in the
.jar file's Manifest.mf.
Bill Dennis
Roedy Green - 16 Jan 2006 23:58 GMT
>Sorry, there's actually more than one jar in the Class-Path. I just
>left out the extra ones to make my message shorter. The actual file
>contains about 10 of them. But I've tried generating with 1, with 2,
>with 5 and with all 10, but still the Class-Path doesn't end up in the
>.jar file's Manifest.mf.
Your template manifest file must end with a line feed.
you must have an m on the command line.
see the other gotchas at http://mindprod.com/jgloss/jar.html#MANIFEST

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.