Bug 50060 - Java support not working
Java support not working
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-07-26 08:20 EDT by Bernhard Rosenkraenzer
Modified: 2007-04-18 12:35 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-07-30 15:45:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bernhard Rosenkraenzer 2001-07-26 08:20:31 EDT
[root@zell JAVA]# rpm -q gcc-java libgcj libgcj-devel
[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++) {
                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 
undefined reference to `main'
collect2: ld returned 1 exit status
Comment 1 Bernhard Rosenkraenzer 2001-07-26 08:52:03 EDT
Same with gij3/gcj3, by the way.
This is a fresh beta3 install.
Comment 2 Glen Foster 2001-07-30 15:45:31 EDT
This defect is considered SHOULD-FIX for Fairfax
Comment 3 Jakub Jelinek 2001-08-03 08:57:22 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.