The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
September 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

applets

Posted by sekhar on August 08, 2001 at 8:16 AM

> Hello,

> I am trying to write a Java applet to access a mysql database. I have written a rudimentary Java application that uses the JDBC driver for mysql (downloaded from your site as a binary) and returns data to the screen just fine when run from the Unix shell. When I convert the same application into an Applet, I get an "unable to load mysql driver " exception after the following lines are executed:

> try{
> Class.forName("org.gjt.mm.mysql.Driver").newInstance();
> }
> catch (Exception E) {
> System.err.println("Unable to load mysql driver");
> }

> This same code works fine in the application version.

> The applet is running on a SCO Unix Openserver 5.0.5 server. I am using JDK 1.2. The browser is MS IE5 on Windows 98. I have installed version 1.3 of the Java Plug-in in order to be able to run 1.2 applets and swing components.

> Is there anything I need to do on the Windows side of things to get this to work? Does the mysql/JDBC driver need to be in the same directory as the applet on the server? Any help or direction would be greatly appreciated.

> - Joel Levitan
> Omega Institute






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us