String (String url) { //strip path inside jar final String jarSeparator = "!/"; final int localPathEndIdx = url.indexOf(jarSeparator); if (localPathEndIdx > -1) { return url.substring(0, localPathEndIdx + jarSeparator.length()); } return url; }