This is the mail archive of the java-discuss@sources.redhat.com 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]

Re: static linking


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

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