This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: Dynamic class loading
- To: Godmar Back <gback at cs dot utah dot edu>
- Subject: Re: Dynamic class loading
- From: Tom Tromey <tromey at cygnus dot com>
- Date: Tue, 15 Feb 2000 20:09:16 -0800 (PST)
- Cc: krab at daimi dot au dot dk (Kresten Krab Thorup), 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
- References: <xz6emaezhzk.fsf@ariel.daimi.au.dk><200002152203.PAA26351@faith.cs.utah.edu>
>>>>> "Godmar" == Godmar Back <gback@cs.utah.edu> writes:
Godmar> It seems that .so files should be treated more similar to .jar
Godmar> or .zip entries in a CLASSPATH than to a .class file. In
Godmar> fact, one simple solution would just be to allow .so files
Godmar> alongside .zip, .jar, or directory paths in a CLASSPATH var
Godmar> (or GCJ_CLASSPATH, as the case may be.) There shouldn't have
Godmar> to be any relationship between the name of the class being
Godmar> loaded and the name of the .so file, me thinks.
First, I don't have any problem changing the current implementation if
that is what we decide.
There are two reasons I like the way things are right now:
1. We don't load every .so around in order to find a given class.
2. We don't require the user to set his CLASSPATH to include every .so
installed on the system. For instance, suppose we package AWT as a
.so ("java-awt.so") and Swing as a .so ("javax-swing.so"). So then
the user has to add both of these to his CLASSPATH. But then if we
add another new package, everybody has to update CLASSPATH. With the
current scheme, we just have to arrange to have the properly-named
.so's appear in the appropriate directory. (For system packagers like
Debian or Red Hat, this means you can just drop the new .so into /lib
and everything will magically work.)
I also don't think that the naming requirement is that big a burden.
That said, I'm curious to know why you (& Per) think that putting the
.so into CLASSPATH is the way to go.
Now it occurs to me that we'd also have to teach gcj to ignore a .so
in CLASSPATH. (Not a big deal.)
Tom