是否可以从小程序读/写文件 [英] Is it possible to read/write a file from an applet

查看:33
本文介绍了是否可以从小程序读/写文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从小程序读取和写入文件,所以如果我从我的小程序查看器运行小程序,我可以读取/写入文件,但是当我尝试从浏览器执行此操作时,我获得了安全性例外.知道如何做到这一点吗?

I've trying to read and write a file from an applet so if I run the applet from my appletviewer it is possible for me to read/write a file but when I try to do it from my browser I get a security exception. Any idea how to do this?

推荐答案

是否可以从小程序读取/写入文件

可以,但您需要对小程序进行签名并获得用户的批准.

Yes, but you need to sign the applet and get approval from the user.

一些有用的链接:

  • How can an Applet read files on the local file system (from coderanch.com)
  • Essentials, Part 1, Lesson 6: File Access and Permissions (from oracle)
  • Chapter 10: Signed Applets (from oracle)

这篇关于是否可以从小程序读/写文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆