Eliza Eliza - 4 years ago 183
Java Question

Applet class not found

I new with applets, and I'm trying to display the applet in my html. (I have installed the plug-in and I'm using Chrome, and i have tried it on IE)

enter image description here

as you can see the applet class is in the source package and I would like to display it in the page that is in the web pages folder

this is my code:

<applet codebase="/AppletPackage/Applet" code="Applet.class" width=800 height=300>Applet Failed</applet>

Answer Source

First make sure your jar file is inside the html file then Try this:

 <applet archive="AppletJarFile.jar"   code="AppletPackage.AppletClassName" width=800 height=300>Applet Failed</applet>

On Html5

<object type="application/x-java-applet" height="400" width="500">
  <param name="code" value="AppletPackage.AppletClassName" />
  <param name="archive" value="AppletJarFile.jar" />
  Applet failed to run.  No Java plug-in was found. </object>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download