Problems with MySQL Driver
I have never done remote logins in Java before, so I am very new to this.
I copied this test code from MySQL 5.0:
Code:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
// Notice, do not import com.mysql.jdbc.*
// or you will have problems!
public class LoadDriver {
public static void main(String[] args) {
try {
// The newInstance() call is a work around for some
// broken Java implementations
Class.forName("com.mysql.jdbc.Driver").newInstance();
} catch (Exception ex) {
// handle the error
}
}
}
I ran it and it worked fine, so I thought I could continue with my own code. When nothing worked however, I went back and added a System.out.prinlnt("Exception: " + ex.getMessage()); to the catch statement.
When I ran the code this time, I got this message:
Exception: com.mysql.jdbc.Driver
I have no idea what this means and Google for once is not helping me at all.
Thanks for your time.