MySQL - Troubleshooting
Finally I have my MySQL JDBC driver working.
As I'm starting to developp Nokia applications, I had Forte for Java installed, J Wireless stuff and many others.
Too much, nothing was working!
I've uninstalled everything, then re-downloaded SDK2
and installed in c:\sdk
I've re-downloaded the mm.mysql-2.0.1-src.zip file and uncompressed into c:\mm.mysql-2.0.1
Set my PATH=%PATH%;c:\sdk
and my CLASSPATH=C:\mm.mysql-2.0.1
Then I've "compiled" with javac.exe this:
import java.sql.*;
// Notice, do not import org.gjt.mm.mysql.*
// 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("org.gjt.mm.mysql.Driver").newInstance();
}
catch (Exception E) {
System.err.println("Unable to load driver.");
E.printStackTrace();
}
}
}

