Class-File API transition to preview, ModuleInfoWriter.java can't access it anymore. we have to add '--enable-preview'.
$make -C /local/home/xxinliu/Devel/jdk/test/hotspot/jtreg/testlibrary/ctw all
cd dist; /local/home/xxinliu/Devel/jdk/build/linux-x86_64-server-fastdebug/jdk/bin/../bin/jar --create --file=wb.jar jdk/test/lib/compiler/ModuleInfoMaker.class jdk/test/lib/compiler/Compiler.class jdk/test/lib/compiler/InMemoryJavaCompil
er.class jdk/test/lib/compiler/CompilerUtils.class jdk/test/whitebox/parser/DiagnosticCommand.class jdk/test/whitebox/WhiteBox.class jdk/test/whitebox/cpuinfo/CPUInfo.class jdk/test/whitebox/gc/GC.class jdk/test/whitebox/code/NMethod.clas
s jdk/test/whitebox/code/Compiler.class jdk/test/whitebox/code/BlobType.class jdk/test/whitebox/code/CodeBlob.class
/local/home/xxinliu/Devel/jdk/build/linux-x86_64-server-fastdebug/jdk/bin/../bin/javac --add-exports java.base/jdk.internal.jimage=ALL-UNNAMED --add-exports java.base/jdk.internal.misc=ALL-UNNAMED --add-exports java.base/jdk.internal.modu
le=ALL-UNNAMED --add-exports java.base/jdk.internal.reflect=ALL-UNNAMED --add-exports java.base/jdk.internal.classfile=ALL-UNNAMED --add-exports java.base/jdk.internal.classfile.attribute=ALL-UNNAMED --add-exports java.base/jdk.internal.c
lassfile.constantpool=ALL-UNNAMED --add-exports java.base/jdk.internal.access=ALL-UNNAMED -sourcepath src -d build/classes -cp dist/wb.jar @filelist
../../../../../test/lib/jdk/test/lib/util/ModuleInfoWriter.java:33: error: ClassFile is a preview API and is disabled by default.
import java.lang.classfile.ClassFile;
^
(use --enable-preview to enable preview APIs)
../../../../../test/lib/jdk/test/lib/util/ModuleInfoWriter.java:35: error: ModuleAttribute is a preview API and is disabled by default.
import java.lang.classfile.attribute.ModuleAttribute;