code: protected String[] toJavaCommandLine(Class<?> type, String... args) {
      List<String> javaCommandLine = new ArrayList<>();
  
      javaCommandLine.add(FileSystemUtils.JAVA_EXE.getAbsolutePath());
      javaCommandLine.add("-server");
      javaCommandLine.add("-classpath");
      javaCommandLine.add(System.getProperty("java.class.path"));
      javaCommandLine.add(type.getName());
      javaCommandLine.addAll(Arrays.asList(ArrayUtils.nullSafeArray(args, String.class)));
  
      return javaCommandLine.toArray(new String[javaCommandLine.size()]);
    }
docs: Builds a Java executable command-line with the given {@link Class} type and program {@link String arguments}.
  
  @param type Java {@link Class} to execute.
  @param args array of {@link String arguments} passed to the Java program.
  @return a {@link String} array containing the elements of the Java command-line.
  @see java.lang.Class