libgcj/2737: User-defined thrown exception is not found

Tom Tromey tromey@redhat.com
Thu Jun 21 09:16:00 GMT 2001


>>>>> ">" == jddahl  <jddahl@micron.com> writes:

JeffS> The main advantage of having class files available is that gcj
JeffS> can parse them much faster than source files.

>> Why do you compile ".java -> .class" if you then compile straight
>> from ".java -> .o"?

Jeff (Sturm) already answered this:

JeffS> The main advantage of having class files available is that gcj
JeffS> can parse them much faster than source files.

>> TEST:
>> gcj --encoding=UTF-8 -c -I/u/jddahl/java/sources -o Test.o
>> /u/jddahl/java/sources/test/core/InitializationException.java
>> /u/jddahl/java/sources/test/core/LotNumber.java Test.java

You're putting the code from both these .java files into Test.o.
Don't do that!

Treat it just like C.  Compile each .java file separately with `-c'.
Then link all the .o files together.

Tom



More information about the Gcc-bugs mailing list