On 18 Jul 2005 15:24:26 -0700, "Murph" <> wrote or
quoted :
>I have an applet and I will be asking the user to allow it to write to
>their computer. This is more to store files so that they will not have
>to download the same files everytime the visit. The user base is very
>small at this time (6 people).
>
>The questions I have are:
>Is it possible, for me to save the files to the current browser's
>cashe. I want to do this so the browser will clear out stale files. I
>don't want to leave garbage on the users HD if they stop useing this
>applet for an extended time.
>
>Once I leave the files, how can I determine where they are on the
>return. I'm assuming that if I can get the browser's cashe location I
>can read and write to that directory.
>
>Any problems with this? I'm trying to be a good citizen by not
>polluting the users HD.
This is the difficult problem. Sun offers no help. All you can do is
poke around in the system properties for clues, or sniff the hard disk
yourself. see
http://mindprod.com/applets/wassup.html
user.home = C:\Documents and Settings\Administrator.ROEDY
java.home = C:\Program Files\Java\jre1.5.0_04
java.library.path = E:\Program
Files\Opera8;.;C:\WINNT\system32;C:\WINNT;c:\BAT;c :\ENV;c:\SYS;c:\WINNT;c:\WINNT\SYSTEM32;
c:\WINNT\SYSTEM32\WBEM;e:\apache-ant-1.6.5\bin\;e:\JET\BIN;e:\VSLICK\WIN;e:\Program
Files\JAVA\JDK1.5.0_04\BIN;e:\Program Files\010Editor;e:\Program
Files\COMMON FILES\ADAPTEC SHARED\SYSTEM;e:\Program Files\Microsoft
Visual Studio\Common\MSDev98\Bin;e:\Program Files\Microsoft Visual
Studio\Common\Tools;e:\Program Files\Microsoft Visual
Studio\Common\Tools\WinNT;e:\Program Files\Microsoft Visual
Studio\VC98\bin;e:\Program Files\Microsoft Visual
Studio\VC98\bin;E:\Program Files\Microsoft Visual
Studio\Common\Tools\WinNT;E:\Program Files\Microsoft Visual
Studio\Common\MSDev98\Bin;E:\Program Files\Microsoft Visual
Studio\Common\Tools;E:\Program Files\Microsoft Visual Studio\VC98\bin
With JAWS, Java will assign you a corner of the disk tree to use, and
it will clear it on uninstall.
In a pinch you can always use the current directory and only use
temporary files. I don't like Sun's temporary file creator because the
files created aro not obviously temporary, and might not eventually be
scavenged.
In the Replicator (see
http://mindprod.com/applets/replicator.html) I
ask the user to assign me two permanent directories for my use. I
give him a fileChooser to select them. These are directories I want to
user to poke around in also. If I wanted some secret hiding space I
would have used the JAWS directory hidden way off in the nether
regions of documents and settings on an already overcrowded C: drive.
--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/...s_rumsfeld.htm
Canadian Mind Products, Roedy Green.
See
http://mindprod.com/iraq.html photos of Bush's war crimes