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.
jqgsninimo <jqgsninimo@hotmail.com>
7d0972625992a6e302d6460900718ef9a90e702b
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: