Java tutorial
//package com.java2s; import java.io.File; import java.io.IOException; public class Main { /** A temp directory SwingWT can use (not used at present) */ private static String tempDirectory = System.getProperty("user.home") + File.separator + "tmp" + File.separator + "swingwt"; /** Checks to see if this users temp directory is there * and creates it if it isn't. * @throws IOException if the directory couldn't be created. */ private static void checkForTempDirectory() throws IOException { File f = new File(tempDirectory); if (!f.exists()) f.mkdirs(); } }