Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jar within a Jar

 
jeff wisgo
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Declare the jar in your MANIFEST.MF in the
Class-Path: mySql.jar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic