[1952] in java-interest
Dynamic Loading of Classes
daemon@ATHENA.MIT.EDU (Gregory Alan Bolcer)
Wed Sep 20 14:35:58 1995
To: java-interest@java.sun.com
Date: Wed, 20 Sep 1995 08:33:37 -0700
From: Gregory Alan Bolcer <gbolcer@liege.ICS.UCI.EDU>
Hi All,
I've programmed myself into a corner, and I am seeking advice
on the following problem. I have a Java unix process that is
maintaining a dynamically changeable object model (categories)
built on top of Java. The methods to these categories can be
dynamically changed at runtime and are implemented as Java classes
within a file directory.
To execute a handler, the process receives a String representation
of a) the Java class name, b) the name of the method, c) the
signature of the method, and d) the parameters to the method. I've
been through the manual pages, looked at the examples, and played
around with classLoader, defineClass, ObjectScope, forName, etc. but
I am having problems with, 1) I'm not sure how to convert
the Class I get into the type I need loaded, and 2) how
to access the methods of this newly loaded type so that
I can execute it. What would be the best approach to
executing the following: "ClassName"."MessageName"(...);
Any advice would be appreciated.
Greg
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com