Here you can find the source of getTempDirectory()
public static File getTempDirectory()
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { public static File getTempDirectory() { return new File(getTempDirectoryPath()); }/*ww w.ja v a 2s .co m*/ public static String getTempDirectoryPath() { return System.getProperty("java.io.tmpdir"); } }