title: Embedding Java Applet in web page
body: <p>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.) </p>
  
  <pre><code>   &lt;body&gt;
      &lt;script src ="http://java.com/js/deployJava.js"&gt;&lt;/script&gt;
      &lt;script&gt;
          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);
          &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>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.</p>
  
  <p>I'm not going to sleep tonight till I get this thing running...</p>
  
  <p>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: </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Schedule a Help Session&lt;/title&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;script src ="http://java.com/js/deployJava.js"&gt;&lt;/script&gt;
      &lt;script&gt;
          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);
          &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>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. </p>