wood burning stoves*
The moose likes Beginning Java and the fly likes Cant run my applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Cant run my applet" Watch "Cant run my applet" New topic

Cant run my applet

Tontang Bei
Ranch Hand

Joined: Oct 21, 2006
Posts: 130
Here is the code for the applet

Here is the cod for the html page

on the command line I type: appletviewer Drop.html and I get a whole bunch of exceptions.

C:\Jav_Dev>appletviewer Drop.html
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:183)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:127)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at Drop.init(Drop.java:17)
at sun.applet.AppletPanel.run(AppletPanel.java:417)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.FileNotFoundException: C:\Jav_Dev\com\mysql\jdbc\Driver.class (The system cann
ot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)

at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:295)
at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:44)
at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:173)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:170)
... 9 more
at Drop.loadTables(Drop.java:43)
at Drop.init(Drop.java:25)
at sun.applet.AppletPanel.run(AppletPanel.java:417)
at java.lang.Thread.run(Thread.java:619)
Deepak Bala

Joined: Feb 24, 2006
Posts: 6661

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

Are the JDBC drivers in your classpath ?

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
wood burning stoves
subject: Cant run my applet
Similar Threads
running Applets from a Mac
Applet loading problem - How to solve this?
Applet question - .class vs .java
problem in an applet
JDBC MySql Driver problem