Reputation: 3308
I have a signed jar bundled in an ear that searches for a configuration file of off the classpath. The configuration file is in the ear's manifest and is located at the root of the ear. The signed jar does not have a manifest and I cannot add one, so how do I add this file to the jar's classpath? I build the ear with ant, and deploy it in JBoss.
EDIT: What is happening is that when I use the jar from one of my sar services, the file specified in the ear's manifest appears to not be on the classpath. When the jar does it's getresource(), it returns null. Perhaps the problem is that the jar itself is using the wrong classloader? Which classloader should it be using?
Upvotes: 2
Views: 1549
Reputation: 1236
Have you tried putting the configuration file itself in a jar and referencing that in the ear manifest? I.e. -
Amend the ear manifest located at /META-INF/MANIFEST.MF, add a Class-path entry:
Class-Path: config.jar
Hope that works.
Upvotes: 1
Reputation: 3685
You might try placing it in META-INF/classes
inside the JAR, though if you cannot add a manifest you might not be able to do so. Are you able to add any files to the JAR?
Upvotes: 0