public static int parseJavaVersion(String version) {
		if (version != null) {
			try {
				String[] nums = version.split("[-.+]");
				String num = nums.length > 1 && nums[0].equals("1") ? nums[1] : nums[0];
				return Integer.parseInt(num);
			} catch (NumberFormatException ex) {
				// Ignore
			}
		}
		return 0;
	}
Returns the Path to JAVA_HOME

@return A Path pointing to JAVA_HOME or null if it isn't defined
src/main/java/dev/jbang/util/JavaUtil.java