This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am trying to run an applet which makes a database connection. I'm using jdk1.2.2, a local Oracle 8.1.7 for unix and the oracle thin driver found in classes111.zip. Although my classpath points to the file classes111.zip, I got the ClassNotFoundException when running the applet. The same setup (path, classpath, jdk1.2.2, oracle 8.1.7) works fine with all the other standalone java applications. What is wrong with the applet ? My html code: <applet archive="classes12.zip" code="applet_main.class">
The exact error message is : # Verifier error oracle/jdbc/driver/OracleConnection.initialize(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Loracle/jdbc/dbaccess/DBAccess;Ljava/util/Hashtable V: Cannot find class java/util/Map java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleConnection at java.lang.ClassLoader.resolveClass(Compiled Code) at java.lang.ClassLoader.loadClassInternal(Compiled Code) at oracle.jdbc.driver.OracleDriver.getConnectionInstance(Compiled Code) at oracle.jdbc.driver.OracleDriver.connect(Compiled Code) at java.sql.DriverManager.getConnection(Compiled Code) at java.sql.DriverManager.getConnection(Compiled Code) at app_applet_main12.execSQL(Compiled Code) at app_applet_main12.init(Compiled Code) * at netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled Code) at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code) at java.awt.EventDispatchThread.run(Compiled Code) at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code) Thanks a lot for any help!!
Although this should probably go in the Applet Section, I think your problem lies within your html file.
That is the object tag in the body of my HTML file to do something similar to what you are doing. The code for Netscape may be a little different. This is for IE. Hope that helps. [ February 13, 2002: Message edited by: Gregg Bolinger ]