Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Executable jar and the classpath

 
Steve Gibson
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote a java app that uses the MS sqlServer jdbc driver. The driver location is in the system classpath (XPpro sp2) and when I execute my app as:

all is good......




So I created a executable jar file and cannot get the sqlServer driver to load.

I created this manifest file:


and created the jar with:


I have tried all kinds of variations of the jar creation and the manifest file, but cannot get the sqlServer driver to load. All I get is:


I have spent the day searching the net for an answer and haven;t come up with anything yet.

HELP!!! what am i doing wrong???
[ March 17, 2006: Message edited by: Steve Gibson ]
 
John Dell'Oso
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Steve,

A couple of points:

The path delimiter in your Class-Path attribute in your manifest file should be space - not a ";". Secondly, the path to the sqljdbc.jar file has to be expressed as a relative path and not an absolute path.

Try this for your Class-Path attribute in the manifest file:

Class-Path: . \MSJDBCDriver\sqljdbc_1_0\enu\sqljdbc.jar

Let us know how you go and good luck,
JD
 
Steve Gibson
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It Worked..... Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic