OT: working directory of another drive on cygwin

Weijun Wang weijun.wang at oracle.com
Wed Nov 4 14:47:59 UTC 2015

In Windows, there is a concept called working directory of another 
drive. For example, in a cmd.exe windows, you can call

   cd d:\xyz

and although you are now still in C:, but if you call "D:" to go to the 
D: drive, you will find yourself in d:\xyz.

In fact, Paths.get("d:").toAbsolutePath() will show it.

Now, I am about to write a jtreg test on it. However, I found in cygwin, 
it's always D:\. If you call "cd d:/xyz", and "cd c:" back, working 
directory of D: is D:\ instead of D:\xyz. That is to say, except for the 
current drive. working directory of any other drive is always the root 

Is there a way to change it? Or must I write a BAT file and call cmd.exe 
/C to execute it?


More information about the core-libs-dev mailing list