This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Fwd: GCJ version 4.3.3 (gcc --enable-languages) error : The import acm cannot be resolved
- From: Andrew Haley <aph at redhat dot com>
- To: Malik Benkirane <malikcpp at gmail dot com>
- Cc: java at gcc dot gnu dot org
- Date: Fri, 07 May 2010 10:14:58 +0100
- Subject: Re: Fwd: GCJ version 4.3.3 (gcc --enable-languages) error : The import acm cannot be resolved
- References: <x2s265e999a1005070200lbf77e246m139c67911dadffd2@mail.gmail.com> <z2s265e999a1005070205r95c321e8ndad4d45812e3712c@mail.gmail.com>
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.