Here you can find the source of getTempPath()
public static synchronized String getTempPath()
//package com.java2s; /*********************************************************** * This software is part of the ProM package * * http://www.processmining.org/ * * * * Copyright (c) 2003-2006 TU/e Eindhoven * * and is licensed under the * * Common Public License, Version 1.0 * * by Eindhoven University of Technology * * Department of Information Systems * * http://is.tm.tue.nl * * * **********************************************************/ public class Main { public static synchronized String getTempPath() { String path = System.getProperty("java.io.tmpdir", ""); String sep = System.getProperty("file.separator", "\\"); return path.endsWith(sep) ? path : path + sep; }//from w w w .j a v a 2 s . co m }