Dynamic class loading

Jules Bean jmlb2@hermes.cam.ac.uk
Sat May 1 14:39:00 GMT 1999


Per Bothner wrote:
> > from this create the class equivalent of:
> > public class Simple {
> >     native Simple getInstance();
> >     native void hello():
> > }
> 
> I utterly fail to see the point.

I think you're missing something here, Per (I explain below).

> 
> > I realize this is outside the purpose of gcj.
> 
> Yes - it is cmpletely unrelated to what we're trying to do.
> 
> >  Its not something I expect it to
> > do. I just think its an interesting idea that would be useful.
> 
> Why?
> 
> > If nothing else it would allow developers (or managers) to ease into
> > gcj without having to compile the entire program into an executable.
> 
> There are better way to do that.  For example add an interpreter and
> support for ClassLoader to libgcj.

Not for what Sean appears to be suggesting.

My understanding of Sean is something like this:

Developer A currently produces a class library for use by developer B. 
Developer A's class library contains a few native classes and lots of
normal, java-compiled stuff.

What developer A now wants to do is compile, using gcj, his classes (or
some of them, anyway - the CPU intensive ones) into native code, but
automatically provide jni stubs so that as far as developer B is
concerened, they're just normal native classes.

I.e. what Sean wants to do is code his java partly bytecode, partly
native, but rather than writing the native bits in C, he wants to write
them in Java too.

I can see that would be neat, too..

Jules



-- 
/----------------+-------------------------------+---------------------\
|  Jelibean aka  | jules@jellybean.co.uk         |  6 Evelyn Rd        |
|  Jules aka     |                               |  Richmond, Surrey   |
|  Julian Bean   | jmlb2@hermes.cam.ac.uk        |  TW9 2TF *UK*       |
+----------------+-------------------------------+---------------------+
|  War doesn't demonstrate who's right... just who's left.             |
|  When privacy is outlawed... only the outlaws have privacy.          |
\----------------------------------------------------------------------/


More information about the Java mailing list