Met such issue when dealing String with Java, so just mark it.
Requirement:
Orginal String: "D:\test.file"
Expected String: "D:\\test.file"
Java Solution:
ExpectedStr = OrginalStr.replace("\\", "\\\\");
BTW, replaceAll() function will fail to use.