This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Class file generated by "gcj -C" throws ClassFormatError


>>>>> ">" == 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]