I want to pack my application in a .jar file.
I run an application which needs sqljdbc4.jar to access a Sql 2008 Express server. Without the jar the application runs well and gets access to the database. With the jar file it doesn't.
I wrap as follows:
Make Manifest.txt with the following contents: Main-Class: MyMainClass (plus empty line)
Make executable jar: jar -cfm MyAppl.jar Manifest.txt *.class
Run:
java -jar MyAppl.jar
Now the database is not found => Exception: com.microsoft.sqlserver.jdbc.SQLServerDriver
Copiing sqljdbc4.jar to jre/lib/ext is useless.
The same problem exists with the MySql driver.
Help needed!
Docendo discimus (we learn by teaching)
SCJP 5 Zertifizierung, Vorbereitungsbuch; SCJP 6 Zertifizierung, Vorbereitungsbuch