Hello there,
The java security manager "a deamon
thread that is always running within the JVM", does not allow applets to access the file system for security reasons. Also, an applet can not make some calls like "System.exit(0)", and it cannot open sockets with sites other than the one from which it was loaded, otherwise, it would become a trojan.
However there are SIGNED APPLETS. These kind of applets, can be granted more privileges by the security manager.
How do SIGNED APPLETS work?
When faced with a signed applet, the browser asks the user whether he can trust this applet or not. If the user accepts, the signed applet will be loaded with the required privileges, like accessing the file system for example.
Now, how to implement signed applets ?, I advise you to take a look at java.sun.com
Best regards