[root@zell JAVA]# rpm -q gcc-java libgcj libgcj-devel gcc-java-2.96-95 libgcj-2.96-26 libgcj-devel-2.96-26 [root@zell JAVA]# cat GijTest.java public class GijTest { public static void main(String[] args) { int sum=0; for(int current=1; current<=10; current++) { sum+=current; } System.out.println("Sum = " + sum); } } [root@zell JAVA]# gij GijTest.java Segmentation fault (core dumped) [root@zell JAVA]# gcj GijTest.java /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o: In function `_start': /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o(.text+0x18): undefined reference to `main' collect2: ld returned 1 exit status
Same with gij3/gcj3, by the way. This is a fresh beta3 install.
This defect is considered SHOULD-FIX for Fairfax
Both command lines are wrong. gcj should be either used: gcj -C GijTest.java (this one compiles it into bytecodes GijTest.class) or gcj -fmain=GijTest GijTest.java -o GijTest (this one compiles/links GijTest program). gij is Java bytecode interpreter, so giving it Java source file is a bad idea.