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

Malik Benkirane <[email protected]>
Newsgroups gmane.comp.gcc.java.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.