libgcj_bc.so not embedded
Andrew Haley
aph@redhat.com
Mon Apr 9 13:49:00 GMT 2007
Mohsen Saboorian writes:
> It now compiles correctly. The application starts, but gives NCDFE.
> The problem is now the code loaded via reflection, which causes
> problems with -static-gcj option (which someone mentioned earlier). I
> load XML with Java 1.4 API. DOM implementation for GCJ is
> gnu.xml.dom.*, which is not embedde in the final executable file. Is
> is possible to statically link some other library for this mean? If
> yes which library and how?
It's not impossible, just fiddly. Run your code in gij with
-verbose:class, look at the classes that get loaded, and write a
few static references of the form
Class x = gnu.xml.dom.<thing>.class;
The chances are good that you'll only have to write a few of these and
everything you need wil be pulled in.
Andrew.
--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903
More information about the Java
mailing list