Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Different Results on Different System

Tags:

java

io

temp

When I use this code at my home PC, it gives the output as "output1" ,But when i use the same code at my office PC gives a different output as "output2".

code:

System.out.println(System.getProperty("java.io.tmpdir"));
  • Output 1: C:\Users\admin\AppData\Local\Temp\

  • Output 2: C:\Users\admin\AppData\Local\Temp

    Why there is a difference in output?

like image 502
Kanak Shukla Avatar asked Jul 02 '15 09:07

Kanak Shukla


Video Answer


1 Answers

These outputs which the java gives from executing System.out.println(System.getProperty("java.io.tmpdir"));
is taken from the TMP environment variable set in the system...

Check there...

There will be a difference in the path for environment variable set there.

like image 180
CoderNeji Avatar answered Oct 02 '22 05:10

CoderNeji