This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Class file generated by "gcj -C" throws ClassFormatError
- To: Weiqi Gao <weiqigao at yahoo dot com>
- Subject: Re: Class file generated by "gcj -C" throws ClassFormatError
- From: Tom Tromey <tromey at redhat dot com>
- Date: 22 Jun 2001 10:36:46 -0600
- Cc: java at gcc dot gnu dot org
- References: <20010621211829.37424.qmail@web13802.mail.yahoo.com>
- Reply-To: tromey at redhat dot com
>>>>> ">" == Weiqi Gao <weiqigao@yahoo.com> writes:
>> On Sparc/Solaris 2.6, 'gcj -C foo.java' generates a
>> foo.class file that throws ClassFormatError when run
>> with 'java foo':
>> // foo.java
>> class foo {
>> static long x;
>> public static void main(String[] args) {
>> new foo();
>> }
>> }
I didn't try this on Solaris.
I tried it on my x86 Linux box with JDK 1.2.2.
It worked fine.
I also looked at the generated bytecode, and it looks reasonable.
Could send the output of `jcf-dump -c foo'?
That will let us see if the problem is with gcj or with Sun's java.
Tom