Dynamic Class Reloading

Andrew Wiley debio264 at gmail.com
Sat Jul 4 17:24:38 UTC 2009


On Sat, Jul 4, 2009 at 1:47 AM, Peter B. Kessler <Peter.Kessler at sun.com>wrote:
>
>
> If you can describe the part you want to reload as an interface, you can
> change the implementation behind the interface at any time by having your
> own classloader.  Nothing JDK-specific is required, nor is anything needed
> beyond what's already in the JVM.
>
>                        ... peter
>

I'm looking for something more general than that... let me just describe the
functionality I'm trying to achieve.
I'm writing a MUD (it's basically a text-based RPG), and I'm trying to come
up with some equivalent for the "copyover" or "hot boot" functionality that
MUDs written in C and C+ have. Basically, they write the state of the game
out to a file, have the MUD execute itself, and then load the game back up.
In this way, a MUD can reboot without disconnecting any of the players. The
socket descriptors aren't closed during the reboot, which I believe cannot
be replicated in Java.
In Java, I was hoping I would just be able to reload classes without
rebooting the MUD to come close to duplicating this functionality.

Andrew



More information about the discuss mailing list