how to replace regular directory path to java path as string
<p>I am getting file path from database and I want to open that file. I
 received path as
 'D:\Tasks\Electrolux\Asia\XmlToDB\I008_POK_ServiceOrder_201220162609'
 but java treats ':' and '\' as special characters and giving error
 Invalid Character Constant. My expected output is:  'D:\\Tasks/Electrolux/Asia/XmlToDB/I008_POK_ServiceOrder_201220162609' I used replace as below,</p>

<pre><code>public static String getFilePath(String path) {

        str_file_name = path.replace('\\', '/');
        str_file_name = str_file_name.replace(':/', '\\'); //getting error here
        return str_file_name;
    }
</code></pre>