3

If in the manifest for a jar file that needs to load non executable jars, I have the Class-Path: specification and then a directory holding the jars as the class path instead of a jar file. Will the manifest then load the whole directory or will it just fail?

Update: I tried to use Class-Path: foo/* however it failed to load the foo directory. Does the manifest classpath not support regex>

Stephan
  • 41,764
  • 65
  • 238
  • 329
jgr208
  • 2,896
  • 9
  • 36
  • 64

1 Answers1

2

As long as your foo directory contains only .class files, you can safely set the Class-Path: header like this:

Class-Path: foo/

Since you have non executable jars in it, you should use a build tool like Maven to generate the Class-Path: entry for you. The non executable jars will be dependencies of your Maven project.

Reference:

Stephan
  • 41,764
  • 65
  • 238
  • 329