title: Java - Escaped backslashes being taken literally when writing to file
body: <p>I want to store a URL in a properties file. This is the URL:</p>
  
  <pre><code>jdbc\:sqlserver\://dummydata\\SHARED
  </code></pre>
  
  <p>When programming this in Java, I obviously need to escape the backslashes. So my code ends up looking like this</p>
  
  <pre><code>properties.setProperty("db", "jdbc\\:sqlserver\\://dummydata\\\\SHARED");
  </code></pre>
  
  <p>The issue with this is that the properties file is saving the String URL and including the backslashes used for escaping, which is an incorrect URL. I was hoping that Java would interpret the backslashes used for escaping so that only the correct URL is saved. Is there a way to achieve this?</p>