Skip to content

jline triggers a restricted method warning on modern JVMs #1

Description

@seancorfield

Running the CLI REPL on JDK 27 yields this warning:

WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by org.jline.nativ.JLineNativeLoader in an unnamed module (file:/home/sean/.m2/repository/org/jline/jline/4.3.1/jline-4.3.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

I updated the :repl alias from the docs to this:

  :repl   {:extra-deps {io.github.clojure/clojure-cli.repl-server {:mvn/version "0.1.0"}}
           :jvm-opts ["--enable-native-access=ALL-UNNAMED"]
           :main-opts ["-m" "clojure-cli.repl.server" "repl"]}

But those JVM opts don't seem to affect the client that is spawned, as the warning persists.

Is there a way from the :repl alias to pass JVM opts to the spawned client process?

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