Ulf Dittmer wrote:For security reasons, applets are not allowed access to the local file system unless you take special steps to allow that. Furthermore applets reside on a server to which the applet has no file I/O access to begin with (I mention this because you're talking of "in the same folder").
Maybe a WebStart application -or even a standalone desktop application- would be better suited for this task?
Local File System
By default, JWS applications are subject to the same security restrictions as applets. But JWS apps. have access to the JNLP API, which provides the FileContents object available through the FileOpenService and FileOpenService. Here is a
demo of the file services.
As of Sun's
Next Generation Plug-In2, embedded applets can be configured using JWS & have access to the JNLP API.
Server File system
None of an applet or JWS app. (sand-boxed or trusted), or a plain application (no security manager) can write to a place on the server without help from the server. If the server provides a public interface to allow file upload, it can be accessed by a sand-boxed app. if the app. comes from the same server ('phone home').