JackWM
JackWM

Reputation: 10555

In which scenarios the remote class loading are needed?

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?

Upvotes: 0

Views: 751

Answers (2)

Andrey Chaschev
Andrey Chaschev

Reputation: 16516

If you are writing an application server or similar. I.e. JPPF uses remote class loading to perform your distributed computations.

Upvotes: 0

nanofarad
nanofarad

Reputation: 41281

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.

Upvotes: 0

Related Questions