charfi asma wrote: > I try to compile a java file using gcj. > I have already gcj installed . it is a known command: > > [charfi@is010178 hello_JAVA]$ whereis gcj > gcj: /usr/bin/gcj /usr/lib/gcj > [charfi@is010178 hello_JAVA]$ which gcj > /usr/bin/gcj > [charfi@is010178 hello_JAVA]$ gcj -v > Utilisation des specs internes. > Lecture des spécification à partir de /usr/lib/gcc/i586-manbo-linux-gnu/4.3.2/libgcj.spec > renommé les specs startfile à startfileorig > renommé les specs lib à liborig > Target: i586-manbo-linux-gnu > Configuré avec: ../configure --prefix=/usr --libexecdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-checking=release --enable-languages=c,c++,ada,fortran,objc,obj-c++,java --build=i586-manbo-linux-gnu --host=i586-manbo-linux-gnu --with-cpu=generic --with-system-zlib --enable-threads=posix --enable-shared --enable-long-long --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-gtk-cairo --disable-libjava-multilib --enable-ssp --disable-libssp --disable-werror > Modèle de thread: posix > gcc version 4.3.2 (GCC) > [charfi@is010178 hello_JAVA]$ > > When I try to compile Hello.java it generate this error > > [charfi@is010178 hello_JAVA]$ gcj --main=Hello Hello.java > /tmp/charfi/cccglZ0U.o: In function `main': > ccLttvRH.i:(.text+0x2b): undefined reference to `Hello::class$' > collect2: ld a retourné 1 code d'état d'exécution > > I think it is related to the libgcj but I don't know how to install it (I found in the net that I should install it when I install my gcc by modifiying configure.in > but I have no configure file. > > I update my gcc but I still have the same problem. The gcj library is probably a separate package that you have not installed. You need to use your operating system's package installer. Andrew.