Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Another java.lang.NoSuchMethodError: main error

 
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???
 
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 ]
 
Aaaaaand ... we're on the march. Stylin. Get with it tiny ad.
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic