You may want to know the temp location in your environment to use it for some purpose during the execution of the program. Here is the code to help.
public class KnowTempLocation{ public static void main(String args[]) { KnowTempLocation knowTempLocation = new KnowTempLocation(); knowTempLocation.proceed(); } private void proceed() { System.out.println("Your TEMP location is " + System.getenv("TEMP")); }}/*Expected output:[ro[email protected]]# java KnowTempLocationYour TEMP location is /var/tmp/*/