private JavaVersion runAndGetJavaVersion(File javaExecutable)
			throws ParseException, IOException {
		String version = "";
		String arch = "";
		Process proc = Runtime.getRuntime().exec(new String[] { javaExecutable.getAbsolutePath(),
			"-XshowSettings:properties", "-version" });
		try (BufferedReader reader =
			new BufferedReader(new InputStreamReader(proc.getErrorStream()))) {
			String line;
			while ((version.isEmpty() || arch.isEmpty()) && (line = reader.readLine()) != null) {
				line = line.trim();

				String searchString = "java.version = ";
				if (line.startsWith(searchString)) {
					version = line.substring(searchString.length());
				}
				
				searchString = "sun.arch.data.model = ";
				if (line.startsWith(searchString)) {
					arch = line.substring(searchString.length());
				}
			}
		}
		if (version.isEmpty()) {
			throw new ParseException("Failed to find Java version", 0);
		}
		if (arch.isEmpty()) {
			throw new ParseException("Failed to find Java architecture", 0);
		}
		return new JavaVersion(version, arch);
	}
Gets the version of the given Java executable from the output of running "java -version".

@param javaExecutable The Java executable to run and get the version of.
@return The version of the given Java executable.
@throws IOException if there was a problem executing the given Java executable with the 
  "-version" argument.
@throws ParseException if the version string failed to parse.
GhidraBuild/LaunchSupport/src/main/java/ghidra/launch/AppConfig.java