Here you can find the source of getURLPath(URI uri)
public static String getURLPath(URI uri)
//package com.java2s; //License from project: LGPL import java.net.URI; public class Main { public static String getURLPath(URI uri) { if (uri.getScheme().equals("module")) { return "modules/" + uri.getAuthority() + uri.getPath(); } else {//from ww w. ja va2 s . co m return uri.getPath().substring(1); } } }