Tests generated by CDSMHTest_generate.sh scripts include a hard-coded assumption on from where JUnit classes are loaded from. Namely: junit.jar This filename will change in JTREg 7 as described in https://bugs.openjdk.java.net/browse/CODETOOLS-7903047 and attached PRs.
In addition, the code seems to fail on splitting the class path correctly on Windows systems using Cygwin.
Possible fix for both issues: Use the location information stored in JUnit Test class' runtime representation.
String junitJar = Path.of(Test.class.getProtectionDomain().getCodeSource().getLocation().toURI()).toString();