Skip to content

Restricted and deprecated methods called #21

Description

@wfouche

When using Java 24 or Java 25, the following warnings are displayed, In the future when Java 26 is used, these warnings will become errors and Jython will not start.

WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by com.kenai.jffi.internal.StubLoader in an unnamed module (file:/home/wfouche/.m2/repository/com/github/jnr/jffi/1.3.13/jffi-1.3.13.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

WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::putLong has been called by com.kenai.jffi.UnsafeMemoryIO$UnsafeMemoryIO64 (file:/home/wfouche/.m2/repository/com/github/jnr/jffi/1.3.13/jffi-1.3.13.jar)
WARNING: Please consider reporting this to the maintainers of class com.kenai.jffi.UnsafeMemoryIO$UnsafeMemoryIO64
WARNING: sun.misc.Unsafe::putLong will be removed in a future release

As a tempory workaround the following Java runtime options are used to mute these warnings when using either Java 24 or Java 25.

  1. --enable-native-access=ALL-UNNAMED
  2. --sun-misc-unsafe-memory-access=allow or set -Djffi.unsafe.disabled=true

jnr/jffi#165

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions