如何将策略文件添加到嵌入在html文件中的jar applet中

时间:2013-05-09 13:36:04

标签: java security applet policyfiles

我有这个HTML:

<html>
<title>The Hello, World Applet</title>
<hr>
<applet code=javaapplication4.test.class 
        archive="JavaApplication4.jar"
        width=600 height=400>
</applet>
<hr>
</html>

我想在其中添加以下策略文件:

/* AUTOMATICALLY GENERATED ON Thu May 09 15:48:03 AST 2013*/
/* DO NOT EDIT */

grant {
  permission java.security.AllPermission;
};

因为我想让我的applet像桌面应用程序一样AllPermission

我该怎么做?

1 个答案:

答案 0 :(得分:1)

如果你的HTML可以将类似的策略文件插入我的机器,那将是一个巨大的安全漏洞。幸运的是,据我所知,这是不可能的。

如果applet需要信任,请对其进行数字签名。

相关问题