• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jar Files: Kill me NOW.

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Marshal
Posts: 28261
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic