Ticket #171 (closed enhancement: fixed)
All temporary files must be stored in temporary directory
Reported by: | kmaclean | Owned by: | kmaclean |
---|---|---|---|
Priority: | minor | Milestone: | SpeechSubmission 0.1 |
Component: | SpeechSubmission | Version: | Website 0.2 |
Keywords: | Cc: |
Description
Currently, some files are being stored in default user directory
Change History
comment:3 Changed 13 years ago by kmaclean
see Real's how-to: Create a temporary file
The location of the directory used to hold temporary files is defined by the property java.io.tmpdir. The default value can be changed with the command line used to launch the JVM : java -Djava.io.tmpdir=C:\mydir myClass or , on Windows, you can set the environment variable TMP to a different value. On some plateform, the temporary directory returned by java.io.tmpdir do not include a trailing slash. That is, Win NT --> C:\TEMP\ Win XP --> C:\TEMP Solaris --> /var/tmp/ Linux --> /var/tmp It's not a bad idea to check if there is a trailing slash or not. String tempdir = System.getProperty("java.io.tmpdir"); if ( !(tempdir.endsWith("/") || tempdir.endsWith("\\")) ) tempdir = tempdir + System.getProperty("file.separator");
comment:4 Changed 13 years ago by kmaclean
See Sun RFE #4735419
File f=File.createTempFile(...); f.delete(); f.mkdir();
comment:5 Changed 13 years ago by kmaclean
- Status changed from new to closed
- Resolution set to fixed
comment:6 Changed 13 years ago by root
- Milestone SpeechSubmission 0.1 deleted
Milestone SpeechSubmission 0.1 deleted
Note: See
TracTickets for help on using
tickets.