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

--enable-native-access option not recognized in generated runtime

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      When running jlink with the --enable-native-access option and executing the generated Java runtime, it fails with an Unrecognized option: --enable-native-access error. The --enable-native-access option should be recognized and properly handled.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the following command to create a custom Java runtime image:

      jlink --add-options=" --enable-native-access" --output foo --add-modules java.base

      Execute the following command to check the Java version of the generated runtime:

      foo/bin/java -version

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The Java version should be displayed without any errors, and the --enable-native-access option should be recognized and handled correctly.
      ACTUAL -
      The command fails with the following error message:

      Unrecognized option: --enable-native-access

            tongwan Andrew Wang
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: