Code signing was introduced in Java 2 to provide a mechanism for granting elevated privileges to code depending on the security policy in effect. For example, signed Java applets that need to read system properties from a user's machine can escape the default sandbox restrictions. When a signed applet is run, the user is prompted with a security dialog, asking whether the party that signed the code is considered trustworthy. This element of trusting the signature allows applets to escape the default security sandbox restrictions. On the other hand, with applications that use a custom security policy, explicit permissions need to be granted to the particular codebase and optionally, the signer. This has the benefit of ensuring that only trusted signed code runs with the specified privileges.
...