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#LinkingDavid Daney