private int parseVersionPart(String versionPart, String versionPartName) throws ParseException {
		try {
			int i = Integer.parseInt(versionPart);
			if (i < 0) {
				throw new ParseException(versionPartName + " cannot be negative", 0);
			}
			return i;
		}
		catch (NumberFormatException e) {
			throw new ParseException("Failed to convert " + versionPartName + " version to integer",
				0);
		}
	}
Parses a version part string to an integer.

@param versionPart A version part string.
@param versionPartName The version part name (for error reporting).
@return The version part string as an integer.
@throws ParseException if the version part string failed to parse to a valid version part 
  integer.
GhidraBuild/LaunchSupport/src/main/java/ghidra/launch/JavaVersion.java