Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7903043

Add-Exports and Add-Opens MANIFEST entries aren't propagated to forked VMs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • P4
    • None
    • None
    • tools
    • None
    • jmh

    Description

      --add-opens and --add-exports command line options can be conveniently replaced by entries in the META-INF/MANIFEST.MF in the jar file.

      However, doing so for a JMH project only works when -f0 is passed.

      $ unzip -q -c microbenchmarks.jar META-INF/MANIFEST.MF
      Manifest-Version: 1.0
      Add-Opens: java.base/java.lang
      Main-Class: org.openjdk.jmh.Main

      With such a jar, we still see the module error with forking enabled while it runs fine with forking disabled:

      module java.base does not "opens java.lang" to unnamed module @5621f724

      Attachments

        Activity

          People

            Unassigned Unassigned
            ffarquet Francois Farquet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: