When you have an executable jar MyApp.jar
with entry in the manifest.mf:
Class-Path: lib/sqljdbc4.jar
This means that the jar has an external dependency to sqljdbc4.jar
in the (relative) folder lib
. It is not included in the jar you created! So you need to make sure that there is a lib
-folder containing sqljdbc4.jar
relative to that jar when you execute it. So the folder structure when executing needs to be;
+ (a folder)
+ lib
- sqljdbc.jar
- MyApp.jar