Skip to content

Unnamed module, native access warnings #866

Description

@baltzell

Maybe new in 25:

WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::loadLibrary has been called by net.jpountz.util.Native in an unnamed module (file:/ceph24/hallb/ceph/testing/sw/coatjava/clara/plugins/clas12/lib/clas/coat-libs-13.3.0-SNAPSHOT.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

and the same for org.fusesource.jansi.internal.JansiLoader.

Activity

  1. added this to the Java 25 milestone on Oct 8, 2025
  2. added a commit that references this issue on Oct 9, 2025
    2ada2bc
  3. c-dilks commented on Oct 9, 2025

    @c-dilks
    Member

    One approach is -enable-native-access=ALL-UNNAMED, but that's not ideal since it suppresses such warning from all unnamed modules.

    See the "Enabling Native Access More Selectively" section of https://docs.oracle.com/en/java/javase/24/core/restricted-methods.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions