windows - When does System.getProperty("java.io.tmpdir") return "c:\temp" -


just curious when system.getproperty("java.io.tmpdir") returns "c:\temp". according java.io.file java docs-

the default temporary-file directory specified system property java.io.tmpdir. on unix systems default value of property typically "/tmp" or "/var/tmp"; on microsoft windows systems typically "c:\temp". different value may given system property when java virtual machine invoked, programmatic changes property not guaranteed have effect upon the temporary directory used method.

but in case-

system.out.println(system.getproperty("java.io.tmpdir")); 

always returns-

c:\users\admin\appdata\local\temp\ i.e. %temp% 

in conditions return "c:\temp"?

edited: if change %temp% c:\temp c:\temp, right? documentation shows c:\temp instead of c:\temp.

in ms windows temporary directory set environment variable temp. in xp, temporary directory set per-user local settings\temp.

if change temp environment variable c:\temp, same when run :

system.out.println(system.getproperty("java.io.tmpdir"));


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -