943,929 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 73089
  • Java RSS
You are currently viewing page 1 of this multi-page discussion thread
Jul 23rd, 2004
0

java.lang.NoSuchMethodError

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
shingo99 is offline Offline
2 posts
since Jul 2004
Jul 13th, 2005
0

java.lang.NoSuchMethodError

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);
}
}
Reputation Points: 10
Solved Threads: 0
Newbie Poster
udit611 is offline Offline
2 posts
since Jul 2005
Jul 13th, 2005
0

Re: java.lang.NoSuchMethodError

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)
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Jul 13th, 2005
0

Re: java.lang.NoSuchMethodError

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
techy is offline Offline
18 posts
since Jul 2005
Jul 14th, 2005
0

Re: java.lang.NoSuchMethodError

hi,
does your class has main method with the following signature?


[HTML]
public static void main(String args[])
{
}
[/HTML]
regards
srinivas
Reputation Points: 10
Solved Threads: 0
Light Poster
cheenu78 is offline Offline
45 posts
since Jun 2005
Mar 15th, 2007
0

Re: java.lang.NoSuchMethodError

thanks a lot to help


_______________________________
Senswell
RumahParfum
Itvisione
Make Money Online
Reputation Points: 10
Solved Threads: 0
Newbie Poster
archangeloft is offline Offline
1 posts
since Mar 2007
Mar 20th, 2007
0

Re: java.lang.NoSuchMethodError

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mrdsys is offline Offline
1 posts
since Mar 2007
Mar 20th, 2007
0

Re: java.lang.NoSuchMethodError

Click to Expand / Collapse  Quote originally posted by mrdsys ...
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
Reputation Points: 254
Solved Threads: 74
Practically a Posting Shark
thekashyap is offline Offline
804 posts
since Feb 2007
Jul 5th, 2010
0
Re: java.lang.NoSuchMethodError
hey,

me gting d same Error pls help me out with dis....

the program i tried as follows pls refer..
the error is Exceptio in thread "main" java.lang.......

import java.io.*;
class A extends Thread
{
public void run()
{
for(int i=0;i<10;i++)
{
System.out.println("Hello");
}
}
}
class B extends Thread
{
public void run()
{
int i;
for(i=0;i<10;i++)
{
System.out.println("Hi");
}
}
}
class Hiral
{
public static void main (String args[])
{
System.out.println("hello");

A a1=new A();
B b1=new B();
a1.start();
b1.start();
}
}
Reputation Points: 10
Solved Threads: 0
Newbie Poster
hiralchheda is offline Offline
2 posts
since Jul 2010
Jul 5th, 2010
0
Re: java.lang.NoSuchMethodError
hey,

me gting d same Error pls help me out with dis....

the program i tried as follows pls refer..
the error is Exceptio in thread "main" java.lang.......

import java.io.*;
class A extends Thread
{
public void run()
{
for(int i=0;i<10;i++)
{
System.out.println("Hello");
}
}
}
class B extends Thread
{
public void run()
{
int i;
for(i=0;i<10;i++)
{
System.out.println("Hi");
}
}
}
class Hiral
{
public static void main (String args[])
{
System.out.println("hello");

A a1=new A();
B b1=new B();
a1.start();
b1.start();
}
}
Reputation Points: 10
Solved Threads: 0
Newbie Poster
hiralchheda is offline Offline
2 posts
since Jul 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Noob question: Raturning array.
Next Thread in Java Forum Timeline: AVL tree Balancing problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC