This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
Re: static linking
- To: "green at cygnus dot com" <green at cygnus dot com>
- Subject: Re: static linking
- From: Jeff Sturm <jeff dot sturm at appnet dot com>
- Date: Wed, 06 Dec 2000 10:50:30 -0500
- CC: "'Bryce McKinlay'" <bryce at albatross dot co dot nz>, "java-discuss at sources dot redhat dot com" <java-discuss at sources dot redhat dot com>
- Organization: AppNet
- References: <01C05F12.CE781480.green@redhat.com>
Anthony Green wrote:
> Jeff wrote:
> > 2) classes loaded dynamically (via Class.forName) don't get linked
> >
> > I don't see any good solution. I got around it by linking the following
> dummy
> > class into my executable, but YMMV:
>
> Hmm.. won't the class loader rummage around in appropriately named shared
> libraries? What happens when you make a symlink from libgcj.so to gnu-gcj.so?
Interesting. It might have worked, had gnu-gcj.so been available, but I
suspect there's a bootstrap problem also because VMClassLoader needs the
URL handlers during initialization.
The exact failure was inifite recursion in VMClassLoader.init until
stack was exhausted. Explicitly linking gcj.protocol.file.Handler
solved it.
Jeff