Hello
I implemented an application and now i want to distribute the application by creating an executable jar file, but there is a problem with the classpath i think.
The application uses several properties files, several image files and two dependant jar files. There is no error with the properties or image files.
With this command i create the jar file:
jar cvfm iz.jar Manifest.txt com 1280x800Input.properties 1920x1080Input.properties inzdb_test2_nofire.properties inzdb_test2_fire.properties inzdb_test_nofire.properties inzdb_test_fire.properties inzdb_strato.properties inzdb.properties inzdb_local.properties med.png hand.png Inzeit.jpg hotel.jpg mysql-connector-java-5.1.13-bin.jar jaybird-full-2.1.6.jar
pause
The Manifest.txt looks like this.
Main-Class: com.inzeit.dbview.TableView
Class-Path: mysql-connector-java-5.1.13-bin.jar jaybird-full-2.1.6.jar
No when i run the iz.jar file with
java -jar iz.jar
the error i get is:
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
I thought the classpath is set properly in the Manifest file, but there seems to be some error.
I hope someone knows what to do here.
Kind regards,
Chang