wood burning stoves 2.0*
The moose likes JDBC and the fly likes Driver class not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Driver class not found" Watch "Driver class not found" New topic
Author

Driver class not found

Srinivas Genji
Ranch Hand

Joined: May 04, 2004
Posts: 37
Hi everyone,
All my mysql-jdbc drivers are kept in C:\ drive,My JDBC program works only if it is kept in c:\, if i place my JDBC file in any other directories,throws an ClassNotFound Exception.
Any Help Appreciated
THanks


Genji B Srinivas<br />M.Tech (IT) Aus
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Java uses class loaders to load classes, unsurprisingly. Class loaders must be told where to look for classes, something you do with the CLASSPATH. So, if you want to use a class make sure the file (or jar containing the file) is in the CLASSPATH.
[ June 10, 2004: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Driver class not found
 
Similar Threads
ClassNotFoundException
RuntimeException
Exception: com.microsoft.jdbc
Compiling servlet [was: HTTP Status 404 - Servlet Login is not available]
How do I set the classpath...