Here you can find the source of getTempDir()
public static File getTempDir()
//package com.java2s; /******************************************************************************* * Copyright 2010-2014 CNES - CENTRE NATIONAL d'ETUDES SPATIALES * * This file is part of SITools2./*from w w w.ja va 2 s . c om*/ * * SITools2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * SITools2 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with SITools2. If not, see <http://www.gnu.org/licenses/>. ******************************************************************************/ import java.io.File; public class Main { /** * Get temporary director * * @return a temp directory */ public static File getTempDir() { String tmpdir = System.getProperty("java.io.tmpdir"); return new File(tmpdir); } }