Modify the method for determining JRE version
Previously, the method assumed that the format of the JRE version is: major.minor.build.
However, for `openjdk 21`, the value of `System.getProperty("java.version")` is `21`.
This caused the previous method of determination to fail, resulting in the following error message:
> Error: Can not proceed with Openfire Setup.
Your current installation fails to meet minimum server requirements - please see the checklist below:
✗ At least JRE 11
✓ Servlet 2.3 Support
✓ JSP 1.2 Support
✓ Openfire Classes
✓ Openfire Home found (/usr/local/openfire)
Therefore, the method was modified to extract the significant digits using the regular expression `^\d+(\.\d+)?` for version comparison.
The modified method for determination was tested in the following environments:
Enhance JRE Version Determination Method by Extracting Only the Major Version for Comparison.
jqgsninimo <jqgsninimo@hotmail.com>
f3566d1d869cbf6eff4aaa429f988e6156daa503
Fixing the redefinition error of `jreVersionCompatible`
Should have used the outer variable `jreVersionCompatible`, but mistakenly defined a new one inside the try block.
Correcting the mistake.