diff --git a/test-framework/junit5/src/main/java/io/quarkus/test/junit/nativeimage/ClassInclusionReport.java b/test-framework/junit5/src/main/java/io/quarkus/test/junit/nativeimage/ClassInclusionReport.java index c571d86f8f99a..78da8657e4afd 100644 --- a/test-framework/junit5/src/main/java/io/quarkus/test/junit/nativeimage/ClassInclusionReport.java +++ b/test-framework/junit5/src/main/java/io/quarkus/test/junit/nativeimage/ClassInclusionReport.java @@ -37,7 +37,10 @@ public static ClassInclusionReport load() { TreeSet set = new TreeSet<>(); try (Scanner scanner = new Scanner(usedClassesReport.toFile())) { while (scanner.hasNextLine()) { - set.add(scanner.nextLine()); + // Starting with GraalVM for JDK 24 the format of the report has changed prefixing each line with + // the class loader name and a colon. We need to strip that part. + String[] line = scanner.nextLine().split(":"); + set.add(line[line.length - 1]); } } catch (FileNotFoundException e) { throw new RuntimeException("Could not load used classes report", e);