On Wed, 6 Feb 2002, jason pollard wrote:
> I'm thinking maybe one could download some bytecode as a string, cast it as
> a panel or canvas class, and set it as the current screen.
Err...you can't do that. You need to pass a byte array to
Class.defineClass() to create a new class. Or get a bit more
sophisticated and just create a ClassLoader that will load the
classes from your server when called upon to do so. If you then
start a new Thread that uses this ClassLoader, you'll automatically
pull down new classes when you need them.
Of course, there may be security restrictions in place to stop you
from doing some of this.
Have a look at the JavaDoc for java.lang.ClassLoader or, for a
better tutorial, try section 11.3 ("Loading Classes") of _The
Java(tm) Programming Language, Third Edition_.
cjs
--
Curt Sampson <cjs_at_cynic.net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC
Received on Thu Feb 7 06:29:38 2002