Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ClassNotFoundException: org.hsqldb.jdbcDriver

807606May 21 2007 — edited May 23 2007
Hi everyone,

i'm perfectly new to Java and have to migrate an existing Java Application to a Java Applet (using Eclipse).
So i changed the main class from "extends JFrame" to "Applet" and renamed the main-Method to init().

Secondly i created the relevant directories on my Web-Server, exported the Applet into a jar-file and wrote a index.html which calls the Applet.

Everything seems to go fine (eclipse applet-viewer works and the Applet starts with no errors), but when i start it from my webserver an error occurs when the Applet wants to register the database-driver hsqldb.jar.
try {
    Class.forName("org.hsqldb.jdbcDriver");

    conn = DriverManager.getConnection("jdbc:hsqldb:"
                                       + db_file_name_prefix,   // filenames
                                       "sa",                    // username
                                       "");                     // password
    } catch (Exception e) {
      System.out.println(e);
    }
i get the error:
java.lang.ClassNotFoundException: org.hsqldb.jdbcDriver

although the hsqldb.jar is in the exported jar (subdir "lib"), i checked the classpath, where it is also included... why does my Applet not find the jar-file ?

i hope this is the right place to ask and anybody can help me :)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 20 2007
Added on May 21 2007
5 comments
4,902 views