Here you can find the source of createTempFolder()
public static File createTempFolder()
//package com.java2s; import java.io.File; import java.util.UUID; public class Main { public static File createTempFolder() { final File file = new File(tempFolder(), UUID.randomUUID() .toString());//from w w w .ja v a2 s . co m file.mkdirs(); file.deleteOnExit(); return file; } private static String tempFolder() { return System.getProperty("java.io.tmpdir"); } }