I went into this understanding this would not work, but I am trying to find out why it does not work, and possibly a way to fix it.
Anyway, I tried using java.io.File objects in an applet, and as soon as I did, it gets an error… Anyyway, based purely on speculation I believe this problem exists (at least partially) because there are two filesystems everytime the Applet is run and the virtual machine cannot choose between the local computer’s filesystem and the servers… I also believe (based on the fact that my java got an error whenever I tried to import java.io.* that another contributor to the problem is that I am importing this thing. If I defined ‘File’ within the applet, and somehow specified the filesystem to use for the JVM, would that fix either or both of my problems? And if yes to either, how wouldI go about doing that?
Java applets run in a "sandbox" – they don’t get access to the local filesystem (unless you sign them and jump through some hoops)
Since applets execute on the "client" they don’t get confused between server and client filesystems – the server filesystem is completely inaccessible (other than as intermediated by some protocol such as FTP or HTTP).
Oracle say
Update: Some clarification of the concepts:
A "java ftp applet" is a Java applet that is some Java bytecode stored in a .jar file on a server where it can be served by a web-server like Apache or IIS to web-browsers like Internet Explorer, FireFox, Chrome, Safari etc.
The usage goes like this
The applet is running in a personal computer, it is only allowed access to files on that computer if the applet is signed and is granted permission by that personal computer.
If the personal computer separately was using a file-sharing protocol (e.g. NFS or SMB) that makes some directories on the server look like local directories on the personal computer (e.g. a drive mapping) – then local applications (such as a signed applet) might be allowed access to those files using regular ordinary plain file IO. This is probably not the case.
The applet never has direct access to files on the server.
The applet may communicate with services on the server by using network protocols (not regular file IO) Some of those services (such as HTTP and FTP based services) may allow the transfer of copies of the contents of files on the server.