title: Replace backslash with forward slash
body: <p>I have the following path:
  <code>com/teama/merc/test/resTest</code>
  And I want to convert it to this:
  <code>com\teama\merc\test\resTest</code></p>
  
  <p>I am trying to append the above path to this path:
  <code>C:\Users\Toby\git\MERCury\MERCury\</code>
  With <code>str.replace('/', '\\');</code> But when I append both of the strings together, this is the output:
  <code>C:\Users\Toby\git\MERCury\MERCury\com/teama/merc/test/resTest</code></p>
  
  <p>Here is the code in question:</p>
  
  <pre><code>    String home = System.getProperty("user.dir");
      path.replace('/', '\\');
      System.out.println(path);
  
      String folder = home + File.separatorChar + path;
      System.out.println(folder);
  
      File file = new File(folder);
      if(file.isDirectory())
      {
          System.out.println(file.getPath() + " is a directory");
      }
  </code></pre>
  
  <p>The appended path is not seen as a folder because of the slashes. Any help? </p>
  
  <p>Edit:
  Just to clarify, the full path (both strings appended) is infact a folder.</p>