libgcj/2737: User-defined thrown exception is not found
Tom Tromey
tromey@redhat.com
Thu Jun 21 09:02:00 GMT 2001
>>>>> ">" == jddahl <jddahl@micron.com> writes:
>> When I execute:
>> gcj -o test Test.o /u/jddahl/java/objects_solaris/test/core/LotNumber.o
>> /u/jddahl/java/objects_solaris/test/core/InitializationException.o
How did you get Test.o? I'm guessing you made it by compiling both of
the other .java files at once.
Don't do that.
Here is how to get what you want:
gcj -c -I/u/jddahl/java/sources --encoding=UTF-8 \
-MD -o /u/jddahl/java/objects_solaris/test/core/LotNumber.o \
/u/jddahl/java/sources/test/core/LotNumber.java
gcj -c -I/u/jddahl/java/sources --encoding=UTF-8 \
-MD -o /u/jddahl/java/objects_solaris/test/core/InitializationException.o \
/u/jddahl/java/sources/test/core/InitializationException.java
gcj --main=test.core.LotNumber -o /u/jddahl/java/objects_solaris/LotNumber \
/u/jddahl/java/objects_solaris/test/core/*.o
This will compile each .java file separately and then link them
together. It assumes that `main' is in test.core.LotNumber. Don't
forget to set LD_LIBRARY_PATH when running the program.
I'm going to close this PR. I don't think there is a bug here.
Tom
More information about the Gcc-bugs
mailing list