I think the problem is basically the same as @Jigar Joshi noted, but with a slight wrinkle to it. I think you have a class whose FQN is "pong.Chase", but you created a class path so that the directory containing "Chase.class" is in the class path. Then you told the applet loader to look for the class as "Chase.class".
The class loader found the bytecode file, but then, when he tried to download it, he noticed that the FQN classes are "pong.Chase" and not "Chase" ... as the name that you gave. Ergo ... a NoClassDefFoundError with the message that the class name is incorrect.
The fix is ββto make sure that the parent directory of the "pong" directory is in the class path and uses:
<APPLET CODE="pong.Chase.class" width=500 height=400></APPLET>
Alternatively, use the codeBase attribute.
Alternatively 2, get rid of the package declaration in your Java class.
Alternative 3 - use the <object> element. The <applet> element is deprecated.
Link: http://www.w3.org/TR/html401/struct/objects.html
Stephen c
source share