[ 
https://issues.apache.org/jira/browse/GEODE-5892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jinmei Liao updated GEODE-5892:
-------------------------------
    Summary: File's absolute path does not change after user.dir is changed in 
jdk11  (was: jdk11 does not allow dynamically change user.dir anymore)

> File's absolute path does not change after user.dir is changed in jdk11
> -----------------------------------------------------------------------
>
>                 Key: GEODE-5892
>                 URL: https://issues.apache.org/jira/browse/GEODE-5892
>             Project: Geode
>          Issue Type: Sub-task
>            Reporter: Jinmei Liao
>            Assignee: Jinmei Liao
>            Priority: Major
>
> {noformat}
> File relativeFile = new File("abc.txt");
> System.setProperty("user.dir", "/somewhereElse");
> System.out.println(relativeFile.getAbsolutePath());
> {noformat}
> pre jdk11, the code above will print out "/somewhereElse/abc.txt" even though 
> the relativeFile object still point to the file under the old user.dir. But 
> in jdk11, the above code will print out "old user.dir/abc.txt".
> dynamically change user.dir never worked reliably pre jdk11, in jdk11, it's 
> made very clear that this won't work anymore.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to