简体   繁体   English

向压缩到JAR文件中的applet授予安全权限

[英]Grant security permission to an applet compressed into an JAR file

I have created a standalone java app that uses a MySQL DB. 我创建了一个使用MySQL DB的独立Java应用程序。 I need to give security permissions to the applet inside the jar file. 我需要给jar文件中的applet安全权限。 How do i do it without making the user do anything more than just a double click on the jar file? 我该如何做而又不让用户做任何事情,而不仅仅是双击jar文件?

A standalone Java application, which is not an applet, will not have a security manager present unless one is explicitly set, so permissions are not necessary. 除非明确设置了一个独立的Java应用程序(而不是applet),否则不会提供安全管理器,因此不需要权限。 That is to say, the code will not have full permissions, but nothing should be checking anyway (it is still possible to tell the lack of permissions through java.security.AccessController ). 也就是说,该代码将没有完整的权限,但是无论如何都不应进行任何检查(仍然可以通过java.security.AccessController来告知缺少权限)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM