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 Class.forName 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 "Class.forName" Watch "Class.forName" New topic


Philip Pross
Ranch Hand

Joined: Jan 17, 2001
Posts: 76
I'm presently learning JDBC, I've done alot of examples for applications, as soon as I turned towards working with applets local in my pc (appletviewer), I've had problems.
I've study the tutorials on the web, and even with this example I found I'm getting errors.
The error is in the try ..... Class.forName
catch(Exception ex)
setError("Can't find Database driver class: " + ex);
Has anyone seen this before?
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

I've heard of some databases being 'picky' as to having '.newInstance()' tagged on to the end of the Class.forName method. try:
-->doesn't have the newInstance() method at end.
I agree. Here's the link:
subject: Class.forName
It's not a secret anymore!