code: private static String resolveJavaCommand(final Path javaHome) {
          final String exe;
          if (javaHome == null) {
              exe = "java";
          } else {
              exe = javaHome.resolve("bin").resolve("java").toString();
          }
          if (exe.contains(" ")) {
              return "\"" + exe + "\"";
          }
          return exe;
      }
docs: Returns the Java executable command.
  
  @param javaHome the java home directory or {@code null} to use the default
  
  @return the java command to use