Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem using mysql jdbc driver in an applet.  RSS feed

 
John Dahlstrom
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm having trouble using the jdbc driver for mysql (the package is called mm.mysql.jdbc-1.2c) in an applet.
I wrote a short test applet that is supposed to select some records from a table and then display them in a List. However, I'm getting a ClassNotFoundException thrown when trying to instantiate the driver class.
I created a nearly identical class that is a Frame instead of an Applet and it works fine.
I've never used jdbc with an applet before. How do I get this to work?
Thanks,
John
 
John Dahlstrom
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind,
It was an applet security thing. The mysql db was on a different host as the one I was serving the applet from. I used the same host for both and it worked.
john
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!