wood burning stoves 2.0
The moose likes Java in General and the fly likes Jar within a Jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Jar within a Jar" Watch "Jar within a Jar" New topic

Jar within a Jar

jeff wisgo

Joined: Apr 20, 2004
Posts: 15
I have an application which uses a mysql connector packaged as a .jar file, and I would like to put my entire application into a Jar file (including the connector jar). I tried putting the connector Jar within my project Jar, but then when I executed the project Jar, it was not able to find the database connector class. Does anyone know the best way to do this? Someone told me I could probably unzip the connector Jar into my project directory, but this seems a messy way to do things.

Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Declare the jar in your MANIFEST.MF in the
Class-Path: mySql.jar

wood burning stoves
subject: Jar within a Jar
It's not a secret anymore!