Marking code as "privileged" enables a piece of trusted code to temporarily enable access to more resources than are available directly to the code that called it. This is necessary in some situations. For example, an application may not be allowed direct access to files that contain fonts, but the system utility to display a document must obtain those fonts, on behalf of the user. In order to do this, the system utility becomes privileged while obtaining the fonts. |
The Secure Class Loader, java.security.SecureClassLoader, tracks the code source and signatures of each class, and hence assigns classes to protection domains. |