In order to make this work you would have to make a signed applet. By default applets are not allowed to access the file system. By creating a signed applet you can get around this issue. When the user initially downloads the page, they will be asked whether they want to trust the applet signed by you. If they say yes then the applet will be able to do just about anything. If they say no then the applet will not run. You can find information on signed applets in the SDK documentation.