Jar cannot find driver

Hello,

How can I include and preserve classpaths in jars? My application access an MS SQL server and it works fine as long is invoked from the command prompt. When I jar it however, I am getting:

java.land.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver

I know it is the JDBC driver that cannot be found, but how to I make the jar application see it?

This is how I run my app from cmd and it works fine:

java -cp "C:\Program Files\Java\jre1.5.0_08\lib\ext\sqljdbc.jar;C:\Program Files\Java\FolderContainingClass" AppName

This is my manifest:

Manifest-Version: 1.2

Main-Class: Kb

Classpath: .\AppName.jar

This is how I create my jar:

jar cvfm AppName.jar AppNameManifest *

The sqljdbc.jar driver is in the same directory with the class and manifest files.

Any hint is appreciated,

Regards

[900 byte] By [mchrisa] at [2007-11-26 14:50:02]
# 1
> Manifest-Version: 1.2> Main-Class: Kb> Classpath: .\AppName.jar It shold be Class-Path:, not Classpath: http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.htmlYou should also add the driver jar to the Class-PathKaj
kajbja at 2007-7-8 8:38:08 > top of Java-index,Java Essentials,New To Java...
# 2
Here is my new manifest:Manifest-Version: 1.2Main-Class: KbClass-Path: .\Kb.jar .\sqljdbc.jarand now I can finally open my jar app and connect to SQL. Kaj, thank you very much.
mchrisa at 2007-7-8 8:38:08 > top of Java-index,Java Essentials,New To Java...