java - NoClassDefFoundError while embedding applet on HTML -


i'm trying easy things jsp , applets. it's easy applet

package pack1; import java.applet.applet; import java.awt.graphics;  public class test2 extends applet {    @override public void paint( graphics g )    {       g.drawstring( "hello!", 10, 10 );    } } 

but can't working in browser. in eclipse it's working fine in browser says noclassdeffounderror. important html part looks like:

<applet code="pack1/test2.class"  width="200" height="200"></applet> 

i tried everything. put test2.class in every directory, , tried many variations of <applet> tag still won't work.

what should do?

picture of folders: picture of folders

you need main method in java application , init method in applet. it's point of entry.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -