This is the mail archive of the java-discuss@sourceware.cygnus.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: Dynamic class loading


> 
> 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


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