This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jar Files: Kill me NOW.

 
Philippe Desrosiers
Ranch Hand
Posts: 138
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to create an executable JAR file, with the following structure:


Seems like, no matter what I put in the Class-Path entry of Manifest.mf, Java can't find the dependency jars in the embedded /lib folder. I've tried many variations on the following:

Class-Path: lib/depJar1.jar lib/depJar2.jar

or

Class-Path: ../lib/depJar1.jar

or

Class-Path: /lib/depJar1.jar

Nothing works, and, amazingly, Google is silent on this topic (as hard as that may be to believe).

Can anyone point me in the right direction?
 
Paul Clapham
Sheriff
Pie
Posts: 20196
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does that word "embedded" mean what I think it does?

The dependent jars are supposed to be in the lib directory under the directory where the executable jar is located. Not inside the executable jar.
 
Uli Hofstoetter
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AFAIK the standard classloader does not support this.

Maybe the classworlds framework can help you.
 
Philippe Desrosiers
Ranch Hand
Posts: 138
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:Does that word "embedded" mean what I think it does?

The dependent jars are supposed to be in the lib directory under the directory where the executable jar is located. Not inside the executable jar.


Okay, I'll check this out. I guess, coming from a servlet-development world, I'm just used to embedding them, without worrying about wether the WAR file gets exploded or not. Never occurred to me this could be different for JAR files.

thanks,
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic