Of course it matters. Each OS has different filesystem rules and the Java runtime is designed to adapt to that; that's the whole point behind a virtual machine after all, to be able to interface with the host environment in a portable way. Hence the Mac version of the Java runtime is returning different results than the Windows Runtime version, yet your code only has to call getPathTranslated() and it magically works on Windows, Linux and Mac without having to care which one it is.
Check out the File.separatorChar constant to see it in writing.
Thanks, for the response.
That makes more sense now. Our application is checking for the '/' and doing some manipulation and was failing for me as the windows is returning the '\\' as the separator. The application is in prod and working fine but, failing on my local machine. Now it's clear why it's failing.
Our application is checking for the '/' and doing some manipulation and was failing for me as the windows is returning the '\\' as the separator.
Your application needs to do what Java does and check for the actual separator character being used.