aspose file tools
The moose likes JDBC and the fly likes Driver class not found Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply 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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Driver class not found
 
Similar Threads
How do I set the classpath...
Exception: com.microsoft.jdbc
ClassNotFoundException
Compiling servlet [was: HTTP Status 404 - Servlet Login is not available]
RuntimeException