java - 通过java applet直接访问文件

标签 java applet jnlp file-access next-generation-plugin

我需要知道小程序是否可以使用直接文件访问功能,而不是通过 JNLP。

小程序是否可以通过标准文件类访问文件:

  • java.nio.file.Files;
  • java.io.FileInputStream;

这对于“下一代小程序”来说可能吗?

这对于预“下一代小程序”可能吗?

最佳答案

是的。如果它是一个签名且有特权的(用户允许的)小程序。

What Applets Can and Cannot Do说(部分)

Applets are either sandbox applets or privileged applets. Sandbox applets are run in a security sandbox that allows only a set of safe operations. Privileged applets can run outside the security sandbox and have extensive capabilities to access the client.

Applets that are not signed are restricted to the security sandbox, and run only if the user accepts the applet. Applets that are signed by a certificate from a recognized certificate authority can either run only in the sandbox, or can request permission to run outside the sandbox. In either case, the user must accept the applet's security certificate, otherwise the applet is blocked from running.

关于java - 通过java applet直接访问文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32682480/

相关文章:

java - 如何在 spring 中创建一个后台任务来持续监听 TCP socket 上的数据

java - 为什么对于 Thread 的子类来说吞咽 InterruptedException 是可以的?

java - 将文本文件加载到列表时出现内存不足错误,即使我指定了足够大的 xmx

java - 如何将 Permissions 和 Codebase 属性放入第三方 jar 的 list 中?

java - 为什么如果在二维数组中的 int 前面放一个 0 会改变输出数字? java

java - 无法在 ASP.NET MVC 应用程序中使用 Java 小程序

.net - 与 Java 小程序共享 ASP.NET session cookie

java - 如何阻止 repaint() 方法闪烁

java - JVM 1.8下远程调试java web start

java - 使用 JNLP API 获取 .jnlp 文件内资源下的 JAR