1

我需要一个 Java 小程序框架或类似的东西来通过浏览器在服务器和本地机器之间同步文件。当然,我可以自己制作那个小程序,但也许有人已经看过或做过那个小程序。

是否有任何 Java 小程序框架可以通过浏览器访问本地文件系统?

4

2 回答 2

2

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).
于 2012-03-27T23:59:21.600 回答
1

默认情况下,小程序无法访问本地文件系统。这篇文章讨论了这个问题。基本上,您需要签署小程序或进行一些本地配置以关闭您无法忍受的限制。我的建议是只关闭你真正需要的限制。

于 2012-03-27T19:45:02.007 回答