private static boolean build(MethodHandles.Lookup lookup, PathClassLoader classLoader) throws Throwable {
    // do not use classLoader as a parent - make sure that we don't make the initial classloader dirty
    // (say, do not load kotlin coroutine classes)
    Class<?> implClass = new PathClassLoader(UrlClassLoader.build()
                                               .files(classLoader.getFiles())
                                               .parent(ClassLoader.getPlatformClassLoader()))
      .loadClass("org.jetbrains.intellij.build.devServer.DevMainImpl");

    @SuppressWarnings("unchecked")
    Collection<Path> newClassPath = (Collection<Path>)lookup
      .findStatic(implClass, "buildDevMain", MethodType.methodType(Collection.class))
      .invokeExact();

    classLoader.reset(newClassPath);
    return true;
  }
private static boolean build(MethodHandles.Lookup lookup, PathClassLoader classLoader)