Why is the user.dir system property working in Java?

前端 未结 3 1912
渐次进展
渐次进展 2020-12-16 05:55

Almost every article I read told me that you can\'t have chdir in Java. The accepted answer to this question says you can\'t do it in Java.

However, here\'s s

3条回答
  •  时光说笑
    2020-12-16 06:07

    Quote:

    The user.dir property is set at VM startup to be the working directory. You should not change this property or set it on the command-line. If you do, then you will see some inconsistent behaviour as there places in the implementation that assumes that the user.dir is the working directory and that it doesn't change during the lifetime of the VM.

    The discussion is here

提交回复
热议问题