diff --git a/findbugs/src/java/edu/umd/cs/findbugs/classfile/impl/ClassPathBuilder.java b/findbugs/src/java/edu/umd/cs/findbugs/classfile/impl/ClassPathBuilder.java index bb0a7af416..107fea2657 100644 --- a/findbugs/src/java/edu/umd/cs/findbugs/classfile/impl/ClassPathBuilder.java +++ b/findbugs/src/java/edu/umd/cs/findbugs/classfile/impl/ClassPathBuilder.java @@ -41,6 +41,7 @@ import java.util.jar.Manifest; import edu.umd.cs.findbugs.FindBugs; +import edu.umd.cs.findbugs.JavaVersion; import edu.umd.cs.findbugs.SystemProperties; import edu.umd.cs.findbugs.classfile.CheckedAnalysisException; import edu.umd.cs.findbugs.classfile.ClassDescriptor; @@ -403,8 +404,8 @@ private LinkedList buildSystemCodebaseList() { } private static boolean isJava9orLater() { - String jvmSpec = System.getProperty("java.vm.specification.version", "8"); - return Integer.parseInt(jvmSpec) >= 9; + JavaVersion javaVersion = JavaVersion.getRuntimeVersion(); + return javaVersion.getMinor() >= 9; } /**