Skip to content

feat: Add Enable-Native-Access: ALL-UNNAMED to the manifest of an executable JAR file #248

Description

@donnykurnia

Feature description

When I run the morphe-desktop-1.12.0-all.jar from terminal using the command:
java -jar morphe-desktop-1.12.0-all.jar

I see this warning message:

WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by org.jetbrains.skiko.LibraryLoader in an unnamed module (file:/home/donny/Downloads/morphe/morphe-desktop-1.12.0-all.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

I look at it and found this suggestion here:
Add Enable-Native-Access: ALL-UNNAMED to the manifest of an executable JAR file.

I hope this can be added to the next release. Thanks.

Motivation

By adding this to the JAR manifest, the jar file can be executed without need to add --enable-native-access=ALL-UNNAMED flags.

Acknowledgements

  • I have checked all open and closed feature requests and this is not a duplicate.
  • I have chosen an appropriate title.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions