Dynamic loading - solutions and more problems
Matt Welsh
mdw@cs.berkeley.edu
Sun Apr 2 21:23:00 GMT 2000
Bryce McKinlay <bryce@albatross.co.nz> writes:
>
> Huh? Why is ToLoadIF undefined? Link it into MainProgram.so and
> everything should work fine.
Right. The problem here is that then somehow I need to know a priori
that ToLoadIF is required by MainProgram.so. Is there some automatic way
of making that determination?
What I'm trying to get to is a point where I can simply compile all of
my .java or .class files to a matching .so, and then just use 'gij' instead
of 'java'. My users are frustrated by having to write complex makefiles to
use gcj ... it would be great if gij could really use precompiled .so files
in place of .class files, without having the programmer to do anything
special.
.class files already include all of their dependencies, and the interpreter
understands how to load them. Why can't gij do the same for .so files?
> > allowing gij to load it won't work if that class accesses *anything
> > outside of the classes defined in libgcj). Using -fno-assume-compiled
> > does not solve the problem because of the bug in
> > PrepareCompiledClasses().
>
> Just to be clear: There is no bug in _Jv_PrepareCompiledClasses() here.
> InitializeClass() is being called on a totally invalid class reference,
> and it just happens to get this far before crashing.
I don't understand. Why is HelloWorld an "invalid" class just because it
was compiled with -fno-assume-compiled? It looks like the -fno-assume-compiled
mechanism is seriously broken if I can't use it for *anything*.
Matt
More information about the Java
mailing list