I have several backslashes ("\") in a properties file. This is what the file looks like:
dir=\\127.0.0.1\d$\dir\dir2\dir3
This results in the string 127.0.0.1d$dirdir2dir3
when the property dir
is used in the code.
I have tried unicode escapes like this:
dir=\u005C\u005C127.0.0.1\u005Cd$\u005Cdir\u005Cdir2\u005Cdir3
I have also tried backslash as escape like this:
dir=\\\\127.0.0.1\\d$\\dir\\dir2\\dir3
Both of the tries above results in the string \\127.0.0.1d$dirdir2dir3
when the property dir
is used in the code.
I want the property dir
to be set to \\127.0.0.1\d$\dir\dir2\dir3
when the property is used in the code. What shall the .properties-file look like to get this result?