Error msg "java.lang.NoSuchMethodError: main"

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


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


you are really a great help, thanx again 
>Ioh,
>
>> 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 Calc.java file to another dir
>> compile this with "javac Calc.java". (no compilant from compiler)
>> I get the class "Calc.class"
>> run the appl with "kaffe Calc"
>Try the following class (copy of test/regression/HelloWorldApp.java):
>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 classes.zip if found) in it.
>
>In any case, never set Sun classes.zip in CLASSPATH before
>Klasses.jar.
>

@@@ 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 SimpleFrame.java"
>> 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: libpng.so.0: 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 libawt.so 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.
>
>Edouard.
>



More information about the kaffe mailing list