Embedding Java Applet in web page

driftboris

New Member
I've built a java applet and am trying to embed it into an HTML file on my server. When I access the page, the applet tries to load but then crashes with a \[code\]ClassNotFoundException\[/code\] on \[code\].applet.BookingApplet.class\[/code\] (which is the name of the applet, where \[code\]applet\[/code\] is the name of the package the applet is in.) \[code\] <body> <script src ="http://java.com/js/deployJava.js"></script> <script> var attributes = { codebase: '/webapp/HelpSessions.jar', code: '/webapp/HelpSessions.jar/applet/BookingApplet.class', archive: '/lib/javax.persistence.jar, /lib/javax.validation-1.0.0.GA.jar, /lib/joda-time-2.1.jar, /lib/mail.jar, /lib/mysql-connector-java-5.1.23-bin.jar', width: 800, height: 600 }; var version = "1.6" deployJava.runApplet(attributes, version); </script></body>\[/code\]This is the first time I've tried to do anything like this, so I'm sure this is just a syntactical error with the way I'm referring to the class files in the HTML. I can post any other code if needed, but I don't think its relevant because the applet runs fine in AppletViewer.I'm not going to sleep tonight till I get this thing running...EDIT: To simplify things, I tried moving everything into one folder so I wouldn't have to deal with the codebase. Here's what it looks like now: \[code\]<html><head> <title>Schedule a Help Session</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body> <script src ="http://java.com/js/deployJava.js"></script> <script> var attributes = { code: '/applet/BookingApplet.class', archive: '/lib/javax.persistence.jar, /lib/javax.validation-1.0.0.GA.jar, /lib/joda-time-2.1.jar, /lib/mail.jar, /lib/mysql-connector-java-5.1.23-bin.jar', width: 800, height: 600 }; var version = "1.6" deployJava.runApplet(attributes, version); </script></body>\[/code\]and I'm getting the same ClassNotFoundException. Also, I can see an InterruptedException in the details on the java console, but it doesn't tell me where (if anywhere) in my code the exception is being caused.
 
Back
Top