Java "user.dir" property - what exactly does it mean? - Stack Overflow
It's the directory where java
was run from, where you started the JVM. Does not have to be within the user's home directory. It can be anywhere where the user has permission to run java.
So if you cd
into /somedir
, then run your program, user.dir
will be /somedir
.
A different property, user.home
, refers to the user directory. As in /Users/myuser
or /home/myuser
or C:\Users\myuser
.
Read full article from Java "user.dir" property - what exactly does it mean? - Stack Overflow
No comments:
Post a Comment