String temp = ""; for (int i=0;i<library_path.length();i++){ char c = library_path.charAt(i); if ( c != '"' ){ temp += c; }else{ changed = true; } } library_path = temp; // remove trailing separator chars if they exist as they stuff up // the following " while( library_path.endsWith(File.separator)){ changed = true; library_path = library_path.substring( 0, library_path.length()-1 ); } if ( changed ){