Consolidate Java version checking code, fix bugs

where versions are in different forms
Add warning about Java 7
This commit is contained in:
zzz
2019-05-12 20:20:13 +00:00
parent adb1c6f58e
commit 04a985cd8c
5 changed files with 43 additions and 10 deletions

View File

@@ -358,8 +358,7 @@ public class PluginStarter implements Runnable {
}
minVersion = stripHTML(props, "min-java-version");
if (minVersion != null &&
VersionComparator.comp(System.getProperty("java.version"), minVersion) < 0) {
if (minVersion != null && !SystemVersion.isJava(minVersion)) {
String foo = "Plugin " + appName + " requires Java version " + minVersion + " or higher";
log.error(foo);
disablePlugin(appName);