Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8250669

Running JMH micros is broken after JDK-8248135

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: infrastructure
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b23

      Description

      It looks like now --enable-preview is on by default at compile time but no at runtime?

      This is awkward for all the people who are not working on preview language features.

      java.lang.UnsupportedClassVersionError: Preview features are not enabled for org/openjdk/bench/vm/lang/generated/MonitorBench_action_jmhTest (class file version 60.65535). Try running with '--enable-preview'
      at java.base/java.lang.ClassLoader.defineClass1(Native Method)
      at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
      at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
      at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:825)
      at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:723)
      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:646)
      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:604)
      at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
      at java.base/java.lang.Class.forName0(Native Method)
      at java.base/java.lang.Class.forName(Class.java:377)
      at org.openjdk.jmh.util.ClassUtils.loadClass(ClassUtils.java:72)
      at org.openjdk.jmh.runner.BenchmarkHandler.<init>(BenchmarkHandler.java:68)
      at org.openjdk.jmh.runner.BaseRunner.runBenchmark(BaseRunner.java:233)
      at org.openjdk.jmh.runner.BaseRunner.doSingle(BaseRunner.java:139)
      at org.openjdk.jmh.runner.BaseRunner.runBenchmarksForked(BaseRunner.java:76)
      at org.openjdk.jmh.runner.ForkedRunner.run(ForkedRunner.java:72)
      at org.openjdk.jmh.runner.ForkedMain.main(ForkedMain.java:84)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              redestad Claes Redestad
              Reporter:
              ecaspole Eric Caspole
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: