Here you can find the source of getTempDir()
private static File getTempDir()
//package com.java2s; /******************************************************************************* * Copyright (c) 2005, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors://from w w w. java2s .com * IBM Corporation - initial API and implementation *******************************************************************************/ import java.io.File; public class Main { private static final String BUFFER_DIR = "./webCache"; private static File getTempDir() { File tempDir = new File(BUFFER_DIR); if (tempDir.exists()) return tempDir; tempDir.mkdir(); return tempDir; } }