Skip to content

Restricted method warning with JDK 24+ #23

@lispyclouds

Description

@lispyclouds

I'm seeing this warning when running on JDK 24+ which is most likely from the dependency we have:

WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::loadLibrary has been called by org.newsclub.net.unix.NativeLibraryLoader$StandardLibraryCandidate in an unnamed module (file:/home/lispyclouds/.m2/repository/com/kohlschutter/junixsocket/junixsocket-common/2.8.1/junixsocket-common-2.8.1.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

should the dep be updated or the users should be adding in that flag (doesn't seem to be a good idea)? not sure how soon would this stop working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions