getJavaExecutablePath static method

String getJavaExecutablePath(
  1. String javaDir
)

Returns the path to the Java executable based on the provided Java directory.

Creates the appropriate path to the Java executable based on the operating system. On Windows, it will point to 'javaw.exe', on other platforms to 'java'.

javaDir Base directory where Java is installed.

Returns the full path to the Java executable.

Implementation

static String getJavaExecutablePath(String javaDir) {
  return p.normalize(
    p.join(javaDir, 'bin', Platform.isWindows ? 'javaw.exe' : 'java'),
  );
}