title: Replace backslashes with forward slashes in filenames in Java?
body: <p>If the OS is Windows, and I get a <code>fileName</code> from the OS, for example in <code>File.listFiles()</code>, I get backslashes. I need to <em>mange</em> these to forward slashes if  want to include the filename in a message <code>String</code>.  Using a <code>replaceAll("\\","/")</code> works fine, but is it dangerous or risky to do it unconditionally?  I am developing on Windows and I want this code to be able to run on other platforms.</p>