/** * Normalizes the path to cater for Windows and other platforms */ public static String normalizePath(String path) { if (path == null) { return null; } if (isWindows()) { // special handling for Windows where we need to convert / to \\ return normalizePath(path, '/', '\\'); } else { // for other systems make sure we use / as separators return normalizePath(path, '\\', '/'); } }