static String resolveJarDirectory(URL resource) {
        if (!resource.getProtocol().equalsIgnoreCase("jar")) {
            throw new IllegalArgumentException("Unexpected jar resource " + resource);
        }
        final String classPath = resource.getPath();
        final int jarIndex = classPath.lastIndexOf("!/");
        if (jarIndex == -1) {
            throw new IllegalArgumentException("jarIndex(!/) not found " + classPath);
        }
        final String jarPath = classPath.substring(0, jarIndex);
        final int dirIndex = jarPath.lastIndexOf('/');
        if (dirIndex == -1) {
            throw new IllegalArgumentException("AgentPath('/') not found " + jarPath);
        }
        String externalForm = jarPath.substring(0, dirIndex);
        final int protocolIndex = externalForm.indexOf('/');
        if (protocolIndex == -1) {
            throw new IllegalArgumentException("protocolIndex index not found " + externalForm);
        }
        return externalForm.substring(protocolIndex);
    }
Avoid agent library conflict
@author Woonduk Kang(emeroad)
commons-server/src/main/java/com/navercorp/pinpoint/common/server/util/AgentLibraryPluginFilter.java