Summary
Print out a warning message during JDK launch when java.io.tmpdir does not exist.
Problem
One of the supported JDK system properties is the java.io.tmpdir
property. It allows a user to override the default directory to which temporary files are stored. If such a property specifies a directory that doesn't exist, application issues may arise where the use of the temporary directory is required. No warning or indication is given to the end user that the value specified via the java.io.tmpdir
property is a bad one.
Solution
Parse the java.io.tmpdir
system property at JDK launch time and print a warning message to standard error stream if a bad, non-existent, directory is specified.
Specification
Behavioral change in that the value of the java.io.tmpdir
system property is now checked at JDK launch time. A warning is printed to the standard error stream if the directory value doesn't exist. The check is performed via a static initializer call triggered via the class loading of java.lang.System
.
The warning printed is "WARNING: java.io.tmpdir location does not exist"