java.lang.NoSuchMethodError

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jul 2004
Posts: 2
Reputation: shingo99 is an unknown quantity at this point 
Solved Threads: 0
shingo99 shingo99 is offline Offline
Newbie Poster

java.lang.NoSuchMethodError

 
0
  #1
Jul 23rd, 2004
hi
im a beginner in Java
i have make a simple program using the JCreator LE
but when i execute file the error below is shown in the command prompt
Exception in thread "main" java.lang.NoSuchMethodError: main
may i know what is the matter?
thank you in advance
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 2
Reputation: udit611 is an unknown quantity at this point 
Solved Threads: 0
udit611 udit611 is offline Offline
Newbie Poster

java.lang.NoSuchMethodError

 
0
  #2
Jul 13th, 2005
hello all...

I have just started with java and am having the same trouble..

it compiles alright.. but at runtime.. it gives this error...

can anybody help with how it can be solved...


---> MY CODE<----

import java.applet.*;
import java.awt.*;

public class tutorial extends Applet
{
public void pain(Graphics g)
{
g.drawString("Hello",20,20);
}
}
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: java.lang.NoSuchMethodError

 
0
  #3
Jul 13th, 2005
That means there is no method matching the signature you gave. It could be a parameter missing, a mispelling, or a number of problems.

udit,
you forget the t in paint:

public void pain(Graphics g)

change to;

public void paint(Graphics g)
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 18
Reputation: techy is an unknown quantity at this point 
Solved Threads: 0
techy techy is offline Offline
Newbie Poster

Re: java.lang.NoSuchMethodError

 
0
  #4
Jul 13th, 2005
You might have misspelt the method name or might have referred to a class hat doesn't exist at all. Post you code to pin-point the error exactly.
techy :)
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 45
Reputation: cheenu78 is an unknown quantity at this point 
Solved Threads: 0
cheenu78's Avatar
cheenu78 cheenu78 is offline Offline
Light Poster

Re: java.lang.NoSuchMethodError

 
0
  #5
Jul 14th, 2005
hi,
does your class has main method with the following signature?


[HTML]
public static void main(String args[])
{
}
[/HTML]
regards
srinivas
We come to love not by finding a perfect person, but by learning to see an imperfect person perfectly.

-Sam Keen, from To Love and Be Loved
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 1
Reputation: archangeloft is an unknown quantity at this point 
Solved Threads: 0
archangeloft archangeloft is offline Offline
Newbie Poster

Re: java.lang.NoSuchMethodError

 
0
  #6
Mar 15th, 2007
thanks a lot to help


_______________________________
Senswell
RumahParfum
Itvisione
Make Money Online
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 1
Reputation: mrdsys is an unknown quantity at this point 
Solved Threads: 0
mrdsys mrdsys is offline Offline
Newbie Poster

Re: java.lang.NoSuchMethodError

 
0
  #7
Mar 20th, 2007
Hello there,

im begineer too, but i found coding is not the matter, please read JCreator Help Contents, u will find JC doesnt have applet viewer, u must insert manually class filename into html applet template provided, then run that html file as usual, why not switch to TextPad, simple & lightweight yet applet viewer builtin
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 539
Reputation: thekashyap will become famous soon enough thekashyap will become famous soon enough 
Solved Threads: 50
thekashyap's Avatar
thekashyap thekashyap is offline Offline
Posting Pro

Re: java.lang.NoSuchMethodError

 
0
  #8
Mar 20th, 2007
Originally Posted by mrdsys View Post
Hello there,

im begineer too, but i found coding is not the matter, please read JCreator Help Contents, u will find JC doesnt have applet viewer, u must insert manually class filename into html applet template provided, then run that html file as usual, why not switch to TextPad, simple & lightweight yet applet viewer builtin
Unless you're FORCED to use JCreator, try Eclipse. It has everything and then some more..
Last edited by thekashyap; Mar 20th, 2007 at 2:33 pm. Reason: Added the link
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC