how to split the string in java in Windows? I used Eg.
String directory=\"C:\\home\\public\\folder\"; String [] dir=direct.split(\"\\\");
split() function in Java accepts regular expressions. So, what you exactly need to do is to escape the backslash character twice:
split()
String[] dir=direct.split("\\\\");
One for Java, and one for regular expressions.