1 Reply Latest reply on Nov 23, 2010 1:06 AM by 817194

    Exception in  thread "main" java.lang.NoSuchMethodError : main

      Hi everyone I am beginner with Java and probably not first who encountered problems with compiled source code. I give an example of my code it comes from a book "Head First Java" page 28 this code looks like this :

      import java.awt.*;
      import java.awt.event.*;
      class Party {
      public void makeInvitation(){
      Frame f = new Frame();
      Label l = new Label("Party at Toms");
      Button b = new Button("Sure!");
      Button c = new Button("Eee...");
      Panel p = new Panel();

      after I compiled it as Type of file : CLASS file

      In Command Prompt I write : java Party and this error like : Exception in thread "main" java.lang.NoSuchMethodError :main

      I struggle with this for 3weeks :( Can anyone can help....

      Thank you in advance Artur