0

I simply tried running a simple Java applet using extends Applet and extends JApplet too as suggested when I searched for it on Google. I am still getting the error:

no main class found

How can I resolve this?

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179

2 Answers2

1

Applets don't have a main method, you need to load applets by appletviewer or in a browser

for example:

<APPLET CODEBASE="../classes/" ARCHIVE="your_jar.jar" 
         CODE=DemoApplet.class WIDTH=140 HEIGHT=45>
    <PARAM NAME="HELPURL" VALUE="help.htm">
</APPLET>
SuRu
  • 739
  • 1
  • 6
  • 19
0

Remebemer java.awt.Applet need a run,paint and destroy methods, I tested some Applets on ReadyToProgram long years ago.

CaptainKnee
  • 139
  • 5