Here you can find the source of getTempDir()
public static IPath getTempDir()
//package com.java2s; /******************************************************************************* * Copyright (c) 2004, 2006 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:/*w w w . j a va 2 s.c om*/ * IBM Corporation - initial API and implementation *******************************************************************************/ import java.io.IOException; import org.eclipse.core.runtime.*; public class Main { public static IPath getTempDir() { String tempPath = System.getProperty("java.io.tmpdir"); try { tempPath = new java.io.File(tempPath).getCanonicalPath(); } catch (IOException e) { //ignore and use non-canonical path } return new Path(tempPath); } }