Applet frameworks for access to local file system

筅森魡賤 提交于 2019-12-08 04:39:18

问题


I need a Java applet framework or something like that for syncing files between server and local machine through browser. Of course I can make that applet myself, but maybe someone has already seen or done that applet.

Are there any Java applet frameworks for accessing the local file system through a browser?


回答1:


See the Applet info. page for references to 'Next Generation'. Since the Next Generation plug-in, even sand-boxed embedded applets can access the local file-system (with the permission of the user, when prompted).

Next Gen. applets:

  • Can be deployed using Java Web Start (while still embedded in a web page).
  • Can therefore access the JNLP API, which provides things like the JNLP file services (which offers sand-boxed access to the local file-system). Here is a demo. of the file services it is based around a frame & free-floating, you can download the source and build files. And here is GIFanim: a sand-boxed, embedded applet that can load images off the local file-system (chosen by the user) to make animated GIFs (which it can then save back to the local file-system).

Prior to the Next Gen. plug-in, applets could access the local file-system in 3 ways:

  • Trusted applet (signed by developer, accepted by the user when prompted).
  • Editing policy files (not recommended for developers, let alone end users).
  • A free floating applet deployed using JWS (odd looking, might as well just use a frame).



回答2:


By default an applet can't access the local file system. This article discusses the issue. Basically, you need to sign the applet or do some local configuration to turn off the restrictions you can't live with. My advice is to turn off only the restrictions you REALLY need.



来源:https://stackoverflow.com/questions/9895601/applet-frameworks-for-access-to-local-file-system

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!