Here you can find the source of getTempDirectory()
public static File getTempDirectory()
//package com.java2s; /******************************************************************************* * Copyright (c) 2006-2010 eBay Inc. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 *******************************************************************************/ import java.io.File; public class Main { /**/* ww w .j a v a 2 s . c o m*/ * Returns the java.io.tmpdir property. Clients are advised to use this * wrapper because at a later stage we can easily change this location. * * @return the default temp dir */ public static File getTempDirectory() { return new File(System.getProperty("java.io.tmpdir")); } }