Error msg "java.lang.NoSuchMethodError: main"

Parmelan, Edouard EP510777 at
Fri Jan 15 01:33:38 PST 1999


> 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

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

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

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