This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Mohsen Saboorian wrote:
Hi,

Since -static-libgcj doesn't embed classes which are loaded
dynamically using reflection, I manually coded:
DocumentBuilderFactory documentBuilderFactory =
DomDocumentBuilderFactory.newInstance()
so that gcj recognizes gnu.xml.dom.* needed classes and embed them in
my native executable file.

When I run my native file (~40MB with -static-libgcj, ~27Mb without
that), it crashes with a NoClassDefFoundError for
gnu.xml.dom.DomDocumentBuilderFactory.

Is it a bug? I'm using gcj 4.1.2 on Ubuntu 6.10.

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 Daney


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]