aspose file tools*
The moose likes Beginning Java and the fly likes Executable jar and the classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Executable jar and the classpath" Watch "Executable jar and the classpath" New topic
Author

Executable jar and the classpath

Steve Gibson
Ranch Hand

Joined: Jan 17, 2006
Posts: 37
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 ]

An insane man is perfectly sane in his own mind - cira 1984 a very young chemically altered S.Gibson<br /> <br />Yes we do build our software idiot proof, problem is they keep building better idiots. - (used by S.Gibson to break the tension during a confernece call with the CIO)
John Dell'Oso
Ranch Hand

Joined: Apr 08, 2004
Posts: 130
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

Joined: Jan 17, 2006
Posts: 37
It Worked..... Thanks
 
Don't get me started about those stupid light bulbs.
 
subject: Executable jar and the classpath