Here you can find the source of getTempFolder(String TEMP_FOLDER_NAME)
public static File getTempFolder(String TEMP_FOLDER_NAME) throws IOException
//package com.java2s; /******************************************************************************* * Copyright (c) 2015 Pivotal, Inc.//from ww w . j ava 2s. c om * 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: * Pivotal, Inc. - initial API and implementation *******************************************************************************/ import java.io.File; import java.io.IOException; public class Main { public static File getTempFolder(String TEMP_FOLDER_NAME) throws IOException { File tempFolder = File.createTempFile(TEMP_FOLDER_NAME, null); tempFolder.delete(); tempFolder.mkdirs(); if (!tempFolder.exists()) { throw new IOException("Failed to create temporary jar file when packaging application for deployment: " + tempFolder.getAbsolutePath()); } return tempFolder; } }