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 how class.forname() works? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "how class.forname() works?" Watch "how class.forname() works?" New topic

how class.forname() works?

rogelio uribe

Joined: Aug 01, 2001
Posts: 14
Hi there:
I'm not clear at all, about the method Class.forName(), I'm trying to use it on my program, but I'm getting the error: Bad Path: <describing PATH>

the code is:
catch(java.lang.ClassNotFoundException e)
System.err.print("ClassNotFoundException: " + e.getMessage());

so, I'm not sure about the meaning of the argument to call this method.
Can anybody help?

Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
actually you are using it correctly.
the problem is not related to the use of the Class.forName() . your code works fine in my computer.
perhaps it is a classpath related issue?
or maybe you dont have Jdbc classes?
check to see if u have the java.sql package?
jQuery in Action, 3rd edition
subject: how class.forname() works?
It's not a secret anymore!