Just curious as to when System.getProperty("java.io.tmpdir")
returns "c:\temp"
. According to the java.io.File Java Docs-
The default temporary-file directory is specified by the system property java.io.tmpdir. On UNIX systems the default value of this property is typically "/tmp" or "/var/tmp"; on Microsoft Windows systems it is typically "c:\temp". A different value may be given to this system property when the Java virtual machine is invoked, but programmatic changes to this property are not guaranteed to have any effect upon the the temporary directory used by this method.
But in my case-
System.out.println(System.getProperty("java.io.tmpdir"));
Always returns-
C:\Users\admin\AppData\Local\Temp\ i.e. %TEMP%
In what conditions will it return "c:\temp"
?
EDITED: If I change %TEMP% to C:\Temp then I will get C:\Temp, right? But the documentation shows c:\Temp instead of C:\Temp.
C:\Temp
by changing %TEMP%, installing Windows 98 or passing it tojava -Djava.io.tmpdir=C:\Temp
. Also check out this: #3437595 – OrdinarilyC:\Temp
then I will getC:\Temp
. Right? but doc showc:\Temp
instead ofC:\Temp
. :) – Bik"C:\\WINNT\\TEMP"
. – Dinc:\Temp
was the default in Windows 9x. – Mathewmathews