Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Driver class not found  RSS feed

 
Srinivas Genji
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!