0

I am creating a jar file with multiple jars referred in Class-Path manifest.mf.

After the jar is created I could see the Class-Path entry values are jumbled up. Please suggest how I can fix it?

I entered like:

lib\axis.jar
 lib\axis-ant.jar

In the jar file it wil become something like:

lib\axis.j
arlib\axis-ant.jar
bhaumikananda
  • 41
  • 2
  • 2
  • 11

1 Answers1

0

I'll assume your JAR contains a section similar to this:

Classpath: lib\axis.jar
 lib\axis-ant.jar

This is a single value split onto multiple lines (the first line, and a continuation line). It is exactly equivalent to:

Classpath: lib\axis.jarlib\axis-ant.jar

The newline and space that indicates a continuation line is not part of the value.

The value needs to include a space between the two filenames. For example (still using a continuation; note the extra space):

Classpath: lib\axis.jar
  lib\axis-ant.jar



Also, note that the JAR tool is within its rights to adjust how lines are split, since this doesn't affect how the value is interpreted. This:

Classpath: lib\axis.j
 arlib\axis-ant.jar

is still equivalent to:

Classpath: lib\axis.jarlib\axis-ant.jar

so the JAR tool is not doing anything wrong by making that change.

user253751
  • 57,427
  • 7
  • 48
  • 90