private static Object createClassLoader(Path path) throws IOException {
try {
try {
return new URLClassLoader(new URL[]{path.toUri().toURL()});
} catch (Exception e) {
return new JarClassLoader(path, true);
}
} catch (NoClassDefFoundError e) {
throw new AssertionError(e);
}
}