Here you can find the source of GetTempFolder()
public static String GetTempFolder()
//package com.java2s; //License from project: Open Source License import java.io.*; public class Main { public static String GetTempFolder() { //return flybase.Native.tempFolder(); // This is what the readseq library uses. String osname = System.getProperty("os.name").toLowerCase(); File ff = null;//from w ww. j a v a 2 s . co m if (osname.startsWith("windows") || System.getProperty("file.separator").equals("\\") || osname.startsWith("os/2")) { ff = new File("\\tmp", ""); if (ff == null || !ff.exists()) ff = new File("\\temp", ""); if (ff == null || !ff.exists()) ff = new File("c:\\temp", ""); } else ff = new File("/tmp", ""); // assume UNIX String fold = null; if (ff != null && ff.exists() && ff.isDirectory()) fold = ff.getPath(); if (fold == null || fold.length() == 0) fold = System.getProperty("user.dir", "") + "/"; return fold; } }