This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Jar within a Jar" Watch "Jar within a Jar" New topic
Author

Jar within a Jar

jeff wisgo
Greenhorn

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.

Thanks.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

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


http://home.arcor.de/hirnstrom/bewerbung
 
Consider Paul's rocket mass heater.
 
subject: Jar within a Jar
 
Similar Threads
Resources in JAR files
Problems accessing MySql from a jar file
WSAD Build Path vs. DD vs. Class Path
jar file only launches first image in GUI
Package Java app that uses MySQL