I've been testing out outputing a log-type file using a FileWriter, wrapped as follows:
Then I'm using the output methods and .
When I try to call these methods from my applet, my appletviewer log says that the file write permission was denied. However, calling the same methods from a console app ...public static void main(String args)...I can do this.
So can does java only allow file write permission from a console-based app?
Would you like to visit a web site with an applet on the page, and have that applet overwrite kernel32.dll -- or upload copies of all your .doc files to a server in Romania?
Applets are denied access to the file system (and many other resources) by default, and are granted access only according to a detailed security policy including digital signatures. This is not a topic for a beginner -- come back and worry about it a little later, after you've got some more Java experience.
That depends entirely on your target user and the uses of the program.
With an Applet, it's pretty easy to "push" the latest and greatest version of the program to your users - just replace the class file(s) on the web server that serves the Applet. Is this an important feature for what you're trying to develop? If it is, note that you might want to check out the Java Web Start technology, which can do a similar thing for stand-alone applications.
Oh...this will not be a web-based applet, simply distributed to be run on user's own computers...the output log will appear on their computer for their won personal use - it will not be written to the server
Joined: Dec 10, 2001
In that case, a stand-alone application would probably fit the bill nicely. You may want to package it as an executable JAR file.