String path = “E:\testFile\product”;
System.out.println("path是:"+path);
String newpath=path.replaceAll("\\\\","\\\\\\\\");

System.out.println("新的路径:"+newpath);

替换后输出之后的路径是:E:\\testFile\\product