I am trying to learn Java in few day. I trying to write content to temp file and save this file in temp folder in Windows (that's my task). I find some solution, but not w开发者_开发知识库ork for me :(
http://www.mkyong.com/java/how-to-write-data-to-temporary-file-in-java/ http://www.roseindia.net/java/example/java/io/create-temp-file.shtmlSome time, i get error on applet, another way is empty page and file is not created, anywhere.
You mention an applet, these operate in a sandbox and will not have access to the local file system. That is why it is not working for you.
Here is another rose india link re writing to a file from an applet.
To extend Paul answer.
Using applets you will have to ask user for location, where the file can be stored.
This behavior prevent applet free access to used hard disk.
精彩评论