This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: Dynamic class loading
- To: krab at daimi dot au dot dk (Kresten Krab Thorup)
- Subject: Re: Dynamic class loading
- From: Godmar Back <gback at cs dot utah dot edu>
- Date: Tue, 15 Feb 2000 15:03:36 -0700 (MST)
- Cc: tromey at cygnus dot com (Tom Tromey), mdw at cs dot berkeley dot edu (Matt Welsh), bryce at albatross dot co dot nz (Bryce McKinlay), java-discuss at sourceware dot cygnus dot com
>
> Tom Tromey <tromey@cygnus.com> writes:
>
> > First we try to load a .so. Then we try to find the .class file for
> > the interpreter. This choice was fairly arbitrary.
> >
>
It seems that .so files should be treated more similar to .jar or .zip
entries in a CLASSPATH than to a .class file. In fact, one simple
solution would just be to allow .so files alongside .zip, .jar, or
directory paths in a CLASSPATH var (or GCJ_CLASSPATH, as the case may be.)
There shouldn't have to be any relationship between the name of
the class being loaded and the name of the .so file, me thinks.
Of course, there are important differences that must be accounted for
somehow: for instance, if you define class A from x.so, you'll have to
define all classes that are contained in x.so from there or else your
dynamic linker will complain.
(Unlike in a .jar archive, which you can treat as a directory of files
that are not related by much more than their being part of a group.)
- Godmar