Here you can find the source of cleanPath(String loc)
private static String cleanPath(String loc)
//package com.java2s; /******************************************************************************* * Copyright (c) 2010-2014 ITER Organization. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ public class Main { private static String cleanPath(String loc) { // Remove reference:file: from the start. TODO find a better way, // and test that this works on windows (it might have ///) if (loc.startsWith("reference:file:")) { loc = loc.substring(15);/* w ww. j a v a 2 s .co m*/ } else if (loc.startsWith("file:")) { loc = loc.substring(5); } else { return loc; } loc = loc.replace("//", "/"); loc = loc.replace("\\\\", "\\"); return loc; } }