Fwd: GCJ version 4.3.3 (gcc --enable-languages) error : The import acm cannot be resolved
Andrew Haley
aph@redhat.com
Fri May 7 09:15:00 GMT 2010
On 05/07/2010 10:05 AM, Malik Benkirane wrote:
> 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
You have to include jarfiles in the classpath. This is true, AFAIK, for
every java compiler.
CLASSPATH=.:acm.jar gcj --main=myfirstgraphics -o test myfirstgraphics.java --main=myfirstgraphics
Andrew.
More information about the Java
mailing list