public static void main(String[] args) throws Exception {
    try {
      Class.forName("java.lang.Module");
      System.err.println(
        "`CommandLineWrapper` is ill-suited for launching apps on Java 9+.\n" +
        "If the run configuration uses \"classpath file\", please change it to \"@argfile\".\n" +
        "Otherwise, please contact support.");
      System.exit(1);
    }
    catch (ClassNotFoundException ignored) { }

    File file = new File(args[0]);
    AppData appData = args[0].endsWith(".jar") ? loadMainClassFromClasspathJar(file, args) : loadMainClassWithCustomLoader(file, args);

    List<String> properties = appData.properties;
    for (String property : properties) {
      if (property.startsWith("-D")) {
        int p = property.indexOf('=');
        if (p > 0) {
          System.setProperty(property.substring(2, p), property.substring(p + 1));
        }
        else {
          System.setProperty(property.substring(2), "");
        }
      }
    }

    Method main = appData.mainClass.getMethod("main", String[].class);
    main.setAccessible(true);  // need to launch package-private classes
    main.invoke(null, new Object[]{appData.args});
  }
public static void main(String[] args)