• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Another java.lang.NoSuchMethodError: main error

 
Jools Birch
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got this code off a book:

A basic program like this can be compiled using javac but it can't be run as the error message, stated on the topic always appears.
Any help just to run this simple applet???
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Applets forum...
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you doing to try to run the Applet? I'd guess you're trying to execute something like java MyApplet from the command line.
Take a look at the Running An Applet section of Sun's The Anatomy of an Applet Lesson. You'll need to create an html document that embeds the Applet on a web page. The Applet can then be viewed executing appletviewer MyAppletPage.html (if the html document were named MyAppletPage.html) or by opening the html document in a web browser (such as IE6).
[ November 16, 2003: Message edited by: Dirk Schreckmann ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic