-findirect-dispatch problem

Michael Baranov michael.baranov@gmail.com
Thu Dec 1 12:17:00 GMT 2005


Hello!
I'm compiling a java application of mine with Mohan Embar's GCC/GCJ
v.4.0.2 (http://www.thisiscool.com/gcc_mingw.htm)
The comands are:
gcj -c my.jar -o my.o -fjni -findirect-dispatch
gcj --main=My -o my.exe my.o -fjni
All goes smoothly, but at runtime it can not find org.w3c.dom.Document
class and many more alike that.
It looks like -findirect-dispatch modifies the code to lookup classes
at runtime AND prevents those classes
from being linked in (does not notice them during compillation?) All
those classes it looks for ARE in my libgcj.
Specifying --classpath or -I to point to libgcj-4.0.2.jar while
compiling doesn't help.
The linker does not demand additional libs.
Instead if I manually extract the classes it can not find (whole
packages) from libgcj-4.0.2.jar
and place them into my.jar - everything compiles and works fine. But
the size of the executable tells me that
code duplication happens then :-( And it is simply wrong...
So, I definetely miss something... It looks like I need to modify my
compile step and make the compiler see those
classes of interest in my libgcj.
Michael.
P.S. never imagined that gcj comunity could be that helpful!
Since I joined, none of my troubles remained unnoticed.
Thanks to all the members of the list and gcc/gcj team!


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /