File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases 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 and Relational Databases
Bookmark "Driver class not found" Watch "Driver class not found" New topic

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

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

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
I agree. Here's the link:
subject: Driver class not found
It's not a secret anymore!