Whats the applet class loader, and what does it buy me?
Applets loaded over the net are loaded by the applet class loader. For example, the appletviewer’s applet class loader is implemented by the class sun.applet.AppletClassLoader. The class loader enforces the Java name space hierarchy. The class loader guarantees that a unique namespace exists for classes that come from the local file system, and that a unique namespace exists for each network source. When a browser loads an applet over the net, that applet’s classes are placed in a private namespace associated with the applet’s origin. Thus, applets loaded from different network sources are partitioned from each other. Also, classes loaded by the class loader are passed through the verifier. The verifier checks that the class file conforms to the Java language specification – it doesn’t assume that the class file was produced by a “friendly” or “trusted” compiler. On the contrary, it checks the class file for purposeful violations of the language type rules and name space restrictions.
Related Questions
- Don buy optional/recommended books until you attend the first class. At that time, ask the instructor: • How is optional/recommended defined? • Is the optional/recommended material necessary to perform successfully in class?
- Whats the applet class loader, and what does it buy me?
- Can this applet create its own class loader?