主jar中缺少权限清单属性

时间:2015-04-24 10:18:38

标签: nullpointerexception permissions applet

我正在尝试在html中运行applet,但继续获取此NullPointerException。

下面是堆栈跟踪,

 try {
     FileInputStream fis = AccessController.doPrivileged(
     new PrivilegedExceptionAction<FileInputStream>() {
         public FileInputStream run() throws FileNotFoundException {
             return new FileInputStream("someFile");
         }
     });
 } catch (PrivilegedActionException e) {
     // e.getException() should be an instance of FileNotFoundException,
     // as only "checked" exceptions will be "wrapped" in a
     // PrivilegedActionException.
     throw (FileNotFoundException) e.getException();
 }

我尝试过的事情:

  1. 签署jar文件
  2. 包括accesscontrol.dopriviledge,

    Bitwise compound assignment
  3. 小程序在applet查看器上运行完美。但是嵌入在html中,会产生NullPointerException。

    请帮助。

0 个答案:

没有答案