• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems setting drivers

 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following code in a class, which has objects of it created by two applets.

I get the JOptionPane showing the message "Getting Drivers" twice, and then the applet fails to initialize. It apparently is getting hung up on Class.forName(...).newInstance(). I can run any a test servlet that gets a JDBC connection just fine. It doesn't appear to be a path problem, because it compiles fine.
Any ideas on where I should start looking?
Thanks!
Jason
 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I got it to work, but I had to copy the folder that contained all the classes for the drivers to the location that my applets were in. Shouldn't have to do this, should I?
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by jason adam:
Well, I got it to work, but I had to copy the folder that contained all the classes for the drivers to the location that my applets were in. Shouldn't have to do this, should I?

did you put the jdbc driver file into your classpath?
Jamie
 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup, it's in there. Just seems like anytime I want to use the drivers, I have to have the zip, jar, or extracted package in the same location that the application is in.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic