Reputation: 53
I'm trying to add an applet with multiple jars to an HTML page but i get a NoClassDefFounderror: db.DAO when trying to run the program in my browser. DAO is a class on which TheaterApplet depends. My main JAR is theaterapplet.jar, it uses propproj.jar and firebirdsql-full.jar. i've use the following HTML code:
<APPLET
CODE = "gui.TheaterApplet"
WIDTH = "650"
HEIGHT = "650"
ARCHIVE = "propproj.jar,theaterapplet.jar,firebirdsql-full.jar"
>
</APPLET>
edited: this is the theaterapplet.jar output:
C:\Users\Roel>jar tvf theaterapplet.jar
25 Mon Jan 06 17:49:48 CET 2014 META-INF/MANIFEST.MF
1436 Mon Jul 29 17:41:04 CEST 2013 doc/allclasses-frame.html
1256 Mon Jul 29 17:41:04 CEST 2013 doc/allclasses-noframe.html
3486 Mon Jul 29 17:41:04 CEST 2013 doc/constant-values.html
11598 Mon Feb 25 16:44:08 CET 2013 doc/db/BestellingDAO.html
7251 Mon Jul 29 17:41:04 CEST 2013 doc/db/DAO.html
9171 Mon Feb 25 16:44:08 CET 2013 doc/db/InterfaceBestellingDAO.html
9613 Mon Feb 25 16:44:08 CET 2013 doc/db/InterfaceKlantDAO.html
7439 Mon Jul 29 17:41:04 CEST 2013 doc/db/InterfacePlaatsDAO.html
7116 Mon Jul 29 17:41:04 CEST 2013 doc/db/InterfaceTheaterDAO.html
7397 Mon Jul 29 17:41:04 CEST 2013 doc/db/InterfaceVoorstellingDAO.html
12203 Mon Feb 25 16:44:08 CET 2013 doc/db/KlantDAO.html
9523 Mon Jul 29 17:41:04 CEST 2013 doc/db/PlaatsDAO.html
9094 Mon Jul 29 17:41:04 CEST 2013 doc/db/TheaterDAO.html
8914 Mon Jul 29 17:41:04 CEST 2013 doc/db/TheaterException.html
9370 Mon Jul 29 17:41:04 CEST 2013 doc/db/VoorstellingDAO.html
5532 Mon Feb 25 16:44:10 CET 2013 doc/db/class-use/BestellingDAO.html
6047 Mon Jul 29 17:41:04 CEST 2013 doc/db/class-use/DAO.html
5699 Mon Feb 25 16:44:10 CET 2013 doc/db/class-use/InterfaceBestellingDAO.html
5613 Mon Feb 25 16:44:10 CET 2013 doc/db/class-use/InterfaceKlantDAO.html
5650 Mon Jul 29 17:41:04 CEST 2013 doc/db/class-use/InterfacePlaatsDAO.html
5666 Mon Jul 29 17:41:04 CEST 2013 doc/db/class-use/InterfaceTheaterDAO.html
5795 Mon Jul 29 17:41:04 CEST 2013 doc/db/class-use/InterfaceVoorstellingDAO.h
tml
5432 Mon Feb 25 16:44:08 CET 2013 doc/db/class-use/KlantDAO.html
5464 Mon Jul 29 17:41:04 CEST 2013 doc/db/class-use/PlaatsDAO.html
5484 Mon Jul 29 17:41:04 CEST 2013 doc/db/class-use/TheaterDAO.html
8344 Mon Jul 29 17:41:04 CEST 2013 doc/db/class-use/TheaterException.html
5584 Mon Jul 29 17:41:04 CEST 2013 doc/db/class-use/VoorstellingDAO.html
1566 Mon Jul 29 17:41:04 CEST 2013 doc/db/package-frame.html
6725 Mon Jul 29 17:41:04 CEST 2013 doc/db/package-summary.html
5497 Mon Jul 29 17:41:04 CEST 2013 doc/db/package-tree.html
6111 Mon Jul 29 17:41:04 CEST 2013 doc/db/package-use.html
3436 Mon Jul 29 17:41:04 CEST 2013 doc/deprecated-list.html
8780 Mon Jul 29 17:41:04 CEST 2013 doc/help-doc.html
4900 Mon Jul 29 17:41:04 CEST 2013 doc/index-files/index-1.html
4820 Mon Jul 29 17:41:04 CEST 2013 doc/index-files/index-10.html
4591 Mon Jul 29 17:41:04 CEST 2013 doc/index-files/index-11.html
5978 Mon Feb 25 16:44:10 CET 2013 doc/index-files/index-12.html
5775 Mon Feb 25 16:44:10 CET 2013 doc/index-files/index-13.html
5821 Mon Feb 25 16:44:10 CET 2013 doc/index-files/index-14.html
4866 Mon Feb 25 16:44:10 CET 2013 doc/index-files/index-15.html
4740 Mon Jul 29 17:41:04 CEST 2013 doc/index-files/index-2.html
6185 Mon Jul 29 17:41:04 CEST 2013 doc/index-files/index-3.html
4582 Mon Jul 29 17:41:04 CEST 2013 doc/index-files/index-4.html
4929 Mon Jul 29 17:41:04 CEST 2013 doc/index-files/index-5.html
4570 Mon Jul 29 17:41:04 CEST 2013 doc/index-files/index-6.html
4590 Mon Jul 29 17:41:04 CEST 2013 doc/index-files/index-7.html
4859 Mon Jul 29 17:41:04 CEST 2013 doc/index-files/index-8.html
5493 Mon Jul 29 17:41:04 CEST 2013 doc/index-files/index-9.html
1538 Mon Jul 29 17:41:04 CEST 2013 doc/index.html
781 Mon Jul 29 17:41:04 CEST 2013 doc/overview-frame.html
3956 Mon Jul 29 17:41:04 CEST 2013 doc/overview-summary.html
5425 Mon Jul 29 17:41:04 CEST 2013 doc/overview-tree.html
10 Mon Jul 29 17:41:04 CEST 2013 doc/package-list
2313 Mon Feb 25 16:44:08 CET 2013 doc/resources/background.gif
291 Mon Feb 25 16:44:08 CET 2013 doc/resources/tab.gif
10701 Mon Feb 25 16:44:08 CET 2013 doc/resources/titlebar.gif
849 Mon Feb 25 16:44:08 CET 2013 doc/resources/titlebar_end.gif
3906 Mon Jul 29 17:41:04 CEST 2013 doc/serialized-form.html
11613 Mon Feb 25 16:44:10 CET 2013 doc/stylesheet.css
10216 Mon Jul 29 17:41:04 CEST 2013 doc/util/Util.html
3825 Mon Jul 29 17:41:04 CEST 2013 doc/util/class-use/Util.html
680 Mon Jul 29 17:41:04 CEST 2013 doc/util/package-frame.html
4328 Mon Jul 29 17:41:04 CEST 2013 doc/util/package-summary.html
4002 Mon Jul 29 17:41:04 CEST 2013 doc/util/package-tree.html
3650 Mon Jul 29 17:41:04 CEST 2013 doc/util/package-use.html
508 Mon Jul 29 19:42:16 CEST 2013 .project
527 Mon Jan 06 16:10:52 CET 2014 .classpath
1465 Mon Jan 06 16:10:52 CET 2014 db/DAO.class
2383 Mon Jan 06 16:10:52 CET 2014 gui/TheaterApplet.class
2500 Mon Jan 06 16:10:52 CET 2014 gui/WinkelwagenPanel.class
3055 Mon Jan 06 16:10:52 CET 2014 gui/LoginPanel.class
4775 Mon Jan 06 16:10:52 CET 2014 gui/ZaalPanel.class
1461 Mon Jan 06 16:10:52 CET 2014 gui/VoorstellingPanel$UitvoeringListEvent.cl
ass
1695 Mon Jan 06 16:10:52 CET 2014 gui/VoorstellingPanel$VoorstellingListEvent.
class
4622 Mon Jan 06 16:10:52 CET 2014 gui/VoorstellingPanel.class
1954 Mon Jan 06 16:10:52 CET 2014 model/Voorstelling.class
1336 Mon Jan 06 17:44:06 CET 2014 model/Theater.class
2540 Mon Jan 06 16:10:52 CET 2014 model/Uitvoering.class
723 Mon Jan 06 16:10:52 CET 2014 model/Rang.class
2969 Mon Jan 06 16:10:52 CET 2014 model/Controller.class
1442 Mon Jan 06 16:10:52 CET 2014 model/Plaats.class
Anyone knows what's going wrong?
Upvotes: 0
Views: 71
Reputation: 53
It's solved now. The applet still won't launch from my desktop computer but it launches from all other computers. Something is clearly going wrong locally. Maybe it's my browsers or maybe it has something to do with my security. All that matters is that it works now.
Upvotes: 0
Reputation: 437
On the W3 Schools website http://www.w3schools.com/tags/tag_applet.asp in the example it has
Bubbles.class
. Have you tried using"gui.TheaterApplet.class"
for theCODE
tag?
The above does not work. Pointed out by Andrew Thompson.
If that doesn't work try using JarSplice to create a fat jar and then there will only be one jar and there might be less errors.
Have you tried using the <object>
tag. What browser are you using it on. Your browser may not use the <applet>
tags anymore. And also is TheaterApplet.class
in the package with the exact name of gui
? And I don't think this will change anything but have you tried changing, for example, CODE
to code
. Just a guess.
Upvotes: 1