Wie kann ich Systemunabhängig den File Separator ersetzen? Wenn ich das so
mache, bekomme ich eine Exception:
Code:
File file = new File("C:/juhuuu/test");
String str = file.toString().replaceAll(System.getProperty("file.separator"), "_")
mache, bekomme ich eine Exception:
Exception in thread "AWT-EventQueue-0" java.util.regex.PatternSyntaxException: U
nexpected internal error near index 1
\
^