Fwd: GCJ version 4.3.3 (gcc --enable-languages) error : The import acm cannot be resolved

Malik Benkirane malikcpp@gmail.com
Fri May 7 09:05:00 GMT 2010


Hello,

Here is the program i wish compile with gcj :

>
> import acm.graphics.*;
>
> import acm.program.GraphicsProgram;
>
> public class myfirstgraphics extends GraphicsProgram  {
>
> public void run() {
>
>        add(new GLabel("hello, world", 100, 100));
>
>        }
>
> }

Here is the files in the directory from where i'm running gcj :

> acm.jar  myfirstgraphics.java

But even if I specify CLASSPATH ... i always get same errors :
$> CLASSPATH=. gcj --main=myfirstgraphics -o test myfirstgraphics.java

>
> myfirstgraphics.java:2: error: The import acm cannot be resolved
>
>         import acm.graphics.*;
>                    ^^^
>
> myfirstgraphics.java:3: error: The import acm cannot be resolved
>
>         import acm.program.GraphicsProgram;
>                    ^^^
>
> myfirstgraphics.java:5: error: GraphicsProgram cannot be resolved to a type
>
>         public class myfirstgraphics extends GraphicsProgram
>                                                                 ^^^^^^^^^^^^^^^
>
> myfirstgraphics.java:9: error: GLabel cannot be resolved to a type
>
>         add(new GLabel("hello, world", 100, 100));
>                       ^^^^^^
>
> 4 problems (4 errors)
>

I really need your help for resolving this problem because JVM is too
slow on my machine. Thank you !

Malik



More information about the Java mailing list