Here you can find the source of getURLPath(URL repositoryURL)
public static String getURLPath(URL repositoryURL)
//package com.java2s; // "/**\n" + // " * ====================================================================\n" + // " * DBCLient yet another Jdbc client tool\n" + // " *\n" +/*from ww w . j av a2s .com*/ // " * DBClient is a new Open Source Tool for connecting to jdbc\n" + // " * compliant relational databases. Specific extensions will take care of\n" + // " * each RDBMS implementation.\n" + // " *\n" + // " * Copyright (C) 2006-2007 Taha BEN SALAH\n" + // " *\n" + // " * This program is free software; you can redistribute it and/or modify\n" + // " * it under the terms of the GNU General Public License as published by\n" + // " * the Free Software Foundation; either version 2 of the License, or\n" + // " * (at your option) any later version.\n" + // " *\n" + // " * This program is distributed in the hope that it will be useful,\n" + // " * but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + // " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + // " * GNU General Public License for more details.\n" + // " *\n" + // " * You should have received a copy of the GNU General Public License along\n" + // " * with this program; if not, write to the Free Software Foundation, Inc.,\n" + // " * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n" + // " * ====================================================================\n" + // " */\n" + import java.io.*; import java.net.URL; public class Main { public static String getURLPath(URL repositoryURL) { if ("file".equalsIgnoreCase(repositoryURL.getProtocol())) { File folder = new File(repositoryURL.getFile()); try { return (folder.getCanonicalPath()); } catch (IOException e) { return (folder.getAbsolutePath()); } } else { return (repositoryURL.toString()); } } }