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 :)