0

我正在尝试调用以下内容:

http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html#getResource(java.lang.String)

但是,当我打开以下 java 安全策略时,它会失败(返回 null)。我找不到我必须更改的内容才能使其正常工作?

grant {
  permission java.io.FilePermission "/tmp", "read";
  permission java.io.FilePermission "/tmp/directory.db", "read, write";
  permission java.util.PropertyPermission "data.folder", "read";
  permission java.util.PropertyPermission "user.dir", "read";
  permission java.lang.RuntimePermission "loadLibrary.*";
};
4

0 回答 0