Hi,
Once the JVM is invoked by calling the java.exe file
it does invoke the SecurityManager to see if the objects
being used in the application are allowed to be used.
For a normal application we can make the Security
Manager call by System.setSecurityManager(System.getSecurityManager());Once the Security manager is called then your application will see the java.policy file for the permissions to access the objects
within your application.you can write your own policy file
and then call it as java -java.security.policy=mypolicyfilename myapp.
In case of the applet the SecurityManager is automatically loaded as applet is usually loaded from the different location and cannot be trusted unless the location gives the surity that the applet is fine to be executed.
if your appliaction is failed to follow the permission criterial it gives you the java.security.AccessControlException.
hope this helps you and believe me it has taken me a long time to understand this of my own.
cheers ....
vickyk