E-Mail:
Get our new Windows 7 eBook (PDF) for $7 with 70+ Tips. Download Now!

Understanding Network Class Loaders

  • No Related Post

As many of you already know, Class Loaders are one of the cornerstones of the Java language. At first it might seem a little intimidating. After you get the basics down though, you will find that it is simpler than you might have thought.

In an article put out by Sun, we discover some of the basics and history behind Java. If that is not enough for you, then how about learning the motivation behind creating the language in the first place.

When Java was first released to the public in 1995 it came with a web browser (HotJava), written in Java, that had the ability to automatically and dynamically download mini-applications (or applets) when it encountered the Applet tag in an HTML document. Such Applets are loaded on the fly across the network from remote web servers and run inside the browser’s Java Virtual Machine (JVM). The mechanism that enabled such dynamic loading is a class loader, which is one of the cornerstones of Java dynamism. Class loaders are responsible for determining when and how classes can be added to a running Java environment, as well as making sure that important parts of the Java runtime environment are not replaced by impostor code.

The JVM default class loader knows how to load classes from the local file system, but what if you want to develop state-of-the-art applications that are capable of loading classes from remote servers? Class loaders can also be used to ensure safety and security of byte codes; for example, you can develop a custom class loader capable of checking a digital signature before executing untrusted foreign code.

What Do You Think?

 
33 queries / 0.275 seconds.