问题
Remote class loading means load classes which are not presented in the place where they are executed.
For example, Java Applet needs to load classes from server to local and execute them locally.
Some programs containing URLClassLoader need load classes from network, and execute locally.
How about RMI? I found a class called RMIClassLoader? Is it remote class loading?
回答1:
A class loader is a way to load classes of any sort: Files, network, memory, even dynamically generated ones. A classloader can exist for any way to obtain a valid set of bytes representing a class. The ones you give are good examples. URLClassLoader
loads a class from a known URL. RMIClassLoader
is used by RMI to load the classes that are unmarshalled locally via classes defined remotely.
回答2:
If you are writing an application server or similar. I.e. JPPF uses remote class loading to perform your distributed computations.
来源:https://stackoverflow.com/questions/19594929/in-which-scenarios-the-remote-class-loading-are-needed