On Wed, 5 Aug 2026 12:02:11 GMT, Yasumasa Suenaga <[email protected]> wrote:
> We can see following errors when we run `make test` with > `JTREG="VALUE_CLASS_PLUGIN=true;VM_OPTIONS=--enable-preview"`: > > TestInstanceKlassSize > > stderr: [Exception in thread "main" java.lang.UnsupportedClassVersionError: > Preview features are not enabled for jdk/test/whitebox/WhiteBox (class file > version 72.65535). Try running with '--enable-preview' > at java.base/java.lang.ClassLoader.findBootstrapClass(Native Method) > at java.base/java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoa > der.java:1244) > at java.base/java.lang.System$1.findBootstrapClassOrNull(System.java > :2068) > at java.base/jdk.internal.loader.ClassLoaders$BootClassLoader.loadCl > assOrNull(ClassLoaders.java:138) > at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull( > BuiltinClassLoader.java:639) > at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull( > BuiltinClassLoader.java:615) > at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull( > BuiltinClassLoader.java:639) > at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull( > BuiltinClassLoader.java:615) > at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Builti > nClassLoader.java:578) > at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:502) > at TestInstanceKlassSize.<clinit>(TestInstanceKlassSize.java:65) > ] > exitValue = 1 > > java.lang.RuntimeException: Expected to get exit value of [0], exit value is > : [1] > at jdk.test.lib.process.OutputAnalyzer.shouldHaveExitValue(OutputAna > lyzer.java:602) > at TestInstanceKlassSize.startMeWithArgs(TestInstanceKlassSize.java: > 100) > at TestInstanceKlassSize.main(TestInstanceKlassSize.java:152) > at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke( > DirectMethodHandleAccessor.java:104) > at java.base/java.lang.reflect.Method.invoke(Method.java:583) > at com.sun.javatest.regtest.agent.MainMethodHelper.executeModernMain > Class(MainMethodHelper.java:55) > at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapp > er.java:138) > at java.base/java.lang.Thread.run(Thread.java:1527) > > > TestInstanceKlassSizeForInterface > > stderr: [Exception in thread "main" java.lang.UnsupportedClassVersionError: > Preview features are not enabled for jdk/test/whitebox/WhiteBox (class file > version 72.65535). Try running with '--enable-preview' > at java.base/java.lang.ClassLoader.findBootstrapClass(Native Method) > ... According to [value-class-preview.md](https://github.com/openjdk/jdk/blob/master/doc/value-class-preview.md), `VALUE_CLASS_PLUGIN` allows to compile test code as value classes without any changes if possible. Thus I think it would be better to enable it on SA tests to check whether SA works with value objects. If not, I will withdraw this PR. > Maybe you can fix this by having processBuilder include --enable-preview when > it is part of test.vm.opts? Yes, but I think it is not so good (so far) because they kicks new process with `createLimitedTestJavaProcessBuilder()` because I think it intends not to inherit any args specified in JTREG params. ------------- PR Comment: https://git.openjdk.org/jdk/pull/32210#issuecomment-5199427377
