« Return to Thread: Trying to embed gnu.xml.dom.DomDocumentBuilderFactory

Re: Trying to embed gnu.xml.dom.DomDocumentBuilderFactory

by David Daney :: Rate this Message:

Reply to Author | View in Thread

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

 « Return to Thread: Trying to embed gnu.xml.dom.DomDocumentBuilderFactory