This seems to affect only minimal VM:
----------System.out:(9/789)----------
[0.035s][info][gc] Using Serial
[1.299s][info][gc,heap,exit] Heap
[1.299s][info][gc,heap,exit] def new generation total 4864K, used 4260K [0x56600000, 0x56b40000, 0x75a00000)
[1.299s][info][gc,heap,exit] eden space 4352K, 97% used [0x56600000, 0x56a291e0, 0x56a40000)
[1.299s][info][gc,heap,exit] from space 512K, 0% used [0x56a40000, 0x56a40000, 0x56ac0000)
[1.299s][info][gc,heap,exit] to space 512K, 0% used [0x56ac0000, 0x56ac0000, 0x56b40000)
[1.299s][info][gc,heap,exit] tenured generation total 11008K, used 0K [0x75a00000, 0x764c0000, 0xb4200000)
[1.299s][info][gc,heap,exit] the space 11008K, 0% used [0x75a00000, 0x75a00000, 0x75a00200, 0x764c0000)
[1.299s][info][gc,heap,exit] Metaspace used 4154K, capacity 4203K, committed 4248K, reserved 4400K
----------System.err:(22/1431)----------
java.lang.NoClassDefFoundError: java/lang/management/ManagementFactory
at MemoryWatcher.<init>(TestGCLocker.java:89)
at MemoryUser.<init>(TestGCLocker.java:154)
at TestGCLocker.startMemoryUser(TestGCLocker.java:194)
at TestGCLocker.main(TestGCLocker.java:213)
at TestGCLockerWithSerial.main(TestGCLockerWithSerial.java:35)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:563)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:115)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.ClassNotFoundException: java.lang.management.ManagementFactory
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:552)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:473)
... 11 more
JavaTest Message: Test threw exception: java.lang.NoClassDefFoundError: java/lang/management/ManagementFactory
JavaTest Message: shutting down test