accessing mysql connect-j from inside a jar file
843859Dec 30 2006 — edited Jan 2 2007Hi all,
I have a simple java application which successfully makes a connection to a MySQL database (5.0) using the Connector/J jar file (3.0).
However when I place the application into a jar file, a class not found exception is thrown when attempting to instance the driver using:
Class.forName("com.mysql.jdbc.Driver").newInstance();
I have tried specifying the class path to the Connector/J jarfile both in my jar's manifest and on the command line ( using "java -classpath .;lib\mysql-connector-java-3.0.17-ga-bin.jar -jar bin\DatabaseTest.jar" ), but to no avail.
Any ideas where I'm going wrong?
Thanks...