JDBC Driver errors in command line but not NetBeans
Hello,
I have a java application which I built with NetBeans 6.1 which connects to a MySql DB. When I run the application using F6 in NetBeans, everything runs correctly.
However, when I run the application through the command line with this command:
java -jar "C:\niall\RTN\dist\RTN_Report_Manager.jar"
I get the following error:
java.lang.noclassdeffounderror: com/mysql/jdbc/Connection
I believe this is to do with a jar file minssing from the classpath. However, my classpath includes the location of the jar:
.;C:\niall\Java\jdk1.6.0_02;C:\mysql-connector-java-3.0.17-ga\mysql-connector-java-3.0.17-ga-bin.jar
I have also tried to run the program on the command line with the following commands, both give the same werror as above:
java -jar C:\path to my sql jar -jar "C:\niall\RTN\dist\RTN_Report_Manager.jar"
Any help would be greatly appreciated.