Error msg "java.lang.NoSuchMethodError: main"

loh york hong, brennon cwclohyh at
Fri Jan 15 02:08:28 PST 1999

-----Original Message-----
From: Parmelan, Edouard <EP510777 at>
To: 'kaffe at' <kaffe at>
Date: 15 January 1999 17:37
Subject: RE: Error msg "java.lang.NoSuchMethodError: main"

you are really a great help, thanx again 
>> thanx for such a prompt reply :)
>> pls help again !! 
>> >Have you run "make test" ?
>> no I did not do the make test
>> What I did was copied the file to another dir
>> compile this with "javac". (no compilant from compiler)
>> I get the class "Calc.class"
>> run the appl with "kaffe Calc"
>Try the following class (copy of test/regression/
>class HelloWorldApp {
> public static void main (String args[]) {
> System.out.println("Hello World!");
> }
>Compile it and run kaffe HelloWorldApp

@@@ ya, I this know this one, in fact this is the very first
@@@ program I tried and it worked; no problem !!

>> >
>> >what is the value of CLASSPATH ?
>> >
>> No I did not; I dont think I know how or where
>> to set this !!??
>Could be not defined as kaffe is a shell script that place
>Klasses.jar, pizza.jar (and if found) in it.
>In any case, never set Sun in CLASSPATH before

@@@ well to tell you the truth, I'm still not sure about this !!
@@@ hope u can help on this part

>> >How did you start your Java application ?
>> Say my class name is SimpleFrame,
>> I compiled this with "javac"
>> then I ran the appls with "kaffe SimpleFrame" and these 
>> are the exact messages I got
>Is in SimpleFrame the main method is defined ?
>Remember, it must be "public static void main(String [])"

@@@ is I very sure is "public static void main(String [])"

>> >Have you run "make test" ?
>> No I did not; coz' I downloaded just the binary and 
>> install it; not the src codes.
>> >How did you start your Java application ?
>> run the appl with "kaffe Calc" and these r what I got
>>    Library load fail: cannot open shared object
>As you write before, you just downloaded the binary.
>I don't know if it contains images dynamic libraries :(
>The previous error is due to kaffe that was compiled
>with png (maybe also gif and jpeg) support.
>You need an installed version of png (maybe also gif and jpeg).
>You can find link to jpeg in the "Links" page of Transvirtual.
>I forgot where I found png, may be in a /pub/gnu mirror ?
>Also note that kaffe-1.0.b3 (8 Dec 1998) have some bugs already
>fixed in CVS tree.

More information about the kaffe mailing list