Trying to embed gnu.xml.dom.DomDocumentBuilderFactory

David Daney ddaney@avtrex.com
Fri Apr 20 01:40:00 GMT 2007


Mohsen Saboorian wrote:
>> There is no newInstance() method in DomDocumentBuilderFactory.
> Yes, but shouldn't compiler load each class it encounters in the code?

No, It does not gratuitously load unneeded classes.

> I changed the code to "new DomDocumentBuilderFactory()" but still I
> had the problem.
> 
>> It is not a bug.  Please read the static linking wiki article pointed to
>> by the documentation.  It describes how to work around this situation.
>> http://gcc.gnu.org/onlinedocs/gcj/Linking.html#Linking
> 
> David, would you please tell me the workaround? I see nothing of any
> help for me in that document. my command line looks like this:
> gcj -onative.executable -static-libgcj --main=net.sf.X  a.o  b.o  c.o d.o

http://gcc.gnu.org/wiki/Statically%20linking%20libgcj



More information about the Java mailing list