public static String toSystemDependentPath(String path){
  if (File.separatorChar != '/') {
    path=path.replace('/',File.separatorChar);
  }
  return path;
}

public static String toSystemDependentPath ( String path ) { if ( File . separatorChar != '/' ) { path = path . replace ( '/' , File . separatorChar ) ; } return path ; }
converts a / - based path into a path using the system dependent separator .
