title: Embedding Java applet in html5
body: <p>I'm trying to embed a Java applet that I just made into an HTML 5 compliant page. I'm using the following tag to embed the .jar file:</p>
  
  <pre><code>&lt;object type="application/x-java-applet" height="300" width="550"&gt;
        &lt;param name="code" value="MainClassName" /&gt;
        &lt;param name="archive" value="MyJarFileName.jar" /&gt;
        Applet failed to run.  No Java plug-in was found.
  &lt;/object&gt;
  </code></pre>
  
  <p>The java applet will try to run but stop with:</p>
  
  <pre><code>java.lang.reflect.InvocationTargetException
  </code></pre>
  
  <p>I'm having trouble finding what is the cause of this error. My .jar file will run fine on its own. The main class extends <code>JApplet</code>, which contains a frame, which contains a JPanel.</p>
  
  <p>What is causing this error?</p>