This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Java in General and the fly likes Problem with ClassLoader Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Problem with ClassLoader" Watch "Problem with ClassLoader" New topic
Author

Problem with ClassLoader

Carsten Hansen
Greenhorn

Joined: Sep 04, 2003
Posts: 9
Hi
I've been searching this forum for a solution to my problem, but didn't find any.
I want to load a class from a jar file, and somehow I've succeded,
but I can't use the loaded class, it's a driver for a MySQL db.
I'm loading the class in method loadDriver().
and receiving an error in method dbConnection( String databaseURL, String username, String password)
The error is "No suitable driver"
How can I load the driver in a way that gives some benefit?
I would really appreciate some help on this.
See the code below.
Regards
Carsten
Carsten Hansen
Greenhorn

Joined: Sep 04, 2003
Posts: 9
Problem solved - I found the solution in this forum
A clever fellow wrote this.
web page
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

That's just where I was about to send you
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Problem with ClassLoader