jdk1.3文档: 
This exception is thrown by the AccessController to indicate
 * that a requested access (to a critical system resource such as the
 * file system or the network) is denied.
 *
 * The reason to deny access can vary.  For example, the requested
 * permission might be of an incorrect type,  contain an invalid
 * value, or request access that is not allowed according to the
 * security policy.  Such information should be given whenever
 * possible at the time the exception is thrown.

解决方案 »

  1.   

    好像是安全问题!
    你使用的是applet吗?
      

  2.   

    谢谢海盗的提醒,我将程序改为application后,可以执行了。
    但,为什么?
      

  3.   

    applet使用沙箱模型。在applet中不能调用本地的socket,文件操作等等。这是为了安全性。可以通过改成application来完成,也可以通过签名applet来实现。