List:MySQL and Java« Previous MessageNext Message »
From:Luca Lafranchi Date:January 21 2003 9:27am
Subject:Re: ClassNotFoundException
View as plain text  
Hi :)

>                                                
> Class.forName("c:\\mysqlconnectorjava\\com\\mysql\\jdbc\\Driver").newIns
> tance();

This isn't a driver problem, this is a general java error.
When you call Class.forName(String), you must give as a parameter the 
name of the class with all its package structure, not the path on your 
machine.
So your call should be

Class.forName("com.mysql.jdbc.Driver").newInstance();
Of course you must be sure that your classpath is set up correctly.

Ciao
Luca


Thread
RE: ClassNotFoundException Stephen R. Hartfield21 Jan
  • Re: ClassNotFoundExceptionLuca Lafranchi21 Jan