Error msg "java.lang.NoSuchMethodError: main"

Parmelan, Edouard EP510777 at exchange.FRANCE.NCR.com
Fri Jan 15 01:33:38 PST 1999


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

> 
> >
> >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.

> >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 [])"

> >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