@SuppressWarnings("UseOfSystemOutOrSystemErr")
  public static void main(String[] rawArgs) throws Throwable {
    long start = System.currentTimeMillis();

    MethodHandles.Lookup lookup = MethodHandles.lookup();

    if (!(DevMainKt.class.getClassLoader() instanceof PathClassLoader classLoader)) {
      System.err.println("********************************************************************************************");
      System.err.println("* The current class loader is not a com.intellij.util.lang.PathClassLoader.                *");
      System.err.println("* This may mean that the \"Plugin DevKit\" IntelliJ IDEA plugin is outdated or absent.       *");
      System.err.println("* Please make sure you have the latest version of the Plugin DevKit installed and enabled. *");
      System.err.println("********************************************************************************************");
      return;
    }

    // separate method to not retain local variables like implClass
    if (!build(lookup, classLoader)) {
      // Unable to build the classpath: terminate.
      return;
    }

    System.setProperty("idea.vendor.name", "JetBrains");
    System.setProperty("idea.use.dev.build.server", "true");

    //noinspection UseOfSystemOutOrSystemErr
    System.out.println("build completed in " + (System.currentTimeMillis() - start) + "ms");

    Class<?> mainClass = classLoader.loadClass("com.intellij.idea.Main");
    //noinspection ConfusingArgumentToVarargsMethod
    lookup.findStatic(mainClass, "main", MethodType.methodType(void.class, String[].class)).invokeExact(rawArgs);
  }
@SuppressWarnings("UseOfSystemOutOrSystemErr")
  public static void main(String[] rawArgs)