Here you can find the source of normalize(URI uri)
private static URI normalize(URI uri) throws URISyntaxException
//package com.java2s; //License from project: Open Source License import java.net.URI; import java.net.URISyntaxException; public class Main { private static URI normalize(URI uri) throws URISyntaxException { String path = uri.toString(); //the following prevents 'URI is not hierarchical' exception thrown by File(URI) if (path.startsWith("jar:")) { path = path.substring("jar:".length()); uri = new URI(path); }//from www . j av a 2 s . c o m return uri; } }