Search code examples
javaappletnoclassdeffounderrorbuildpath

Java Applet won't start


I've developed Java Applet application, but I'm having problems with deployment. Application successfully compiled in Eclipse. I exported application in a JAR file. I've created HTML file and put following in it:

<html>
<title>The Hello, World Applet</title>
    <body>
        <hr>
            <applet code="Applet.class" width="100%" height="100%" archive="Clijent.jar" >
            <

            </applet>
        <hr>
    </body>
</html>

When I start applet using web browser, I get following error.

enter image description here

I successfully find that class in my Eclipse project, and I added it to the build path. Where is the problem?


Solution

  • Add the SwingX swingx.jar to class list in the Applet's archive attribute in the applet tag so that it is included in the classpath

    <applet code="Applet.class" width="100%" height="100%" archive="Clijent.jar,swingx.jar" >