Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-8248

WARNING: A restricted method in java.lang.System has been called

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 3.8.1, 3.8.2, 3.8.3, 3.8.4, 3.8.5, 3.8.6, 3.8.7, 3.8.8, 3.9.0, 3.9.1, 3.9.2, 3.9.3, 3.9.4, 3.9.5, 3.9.6, 3.9.7, 3.9.8, 3.9.9, 4.0.0-beta-3, 4.0.0-beta-4
    • None
    • Core
    • None

    Description

      Building a project with JDK 24.ea.13 produces the following WARNING:

      $> mvn clean verify
      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:/Users/khm/tools/maven/lib/jline-3.26.3.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
      

      also a simple:

      mvn --version
      

      wil trigger:

      $> mvn --version
      WARNING: A restricted method in java.lang.System has been called
      WARNING: java.lang.System::load has been called by org.fusesource.jansi.internal.JansiLoader in an unnamed module (file:/Users/khm/tools/maven/lib/jansi-2.4.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
      
      Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
      Maven home: /Users/khm/tools/maven
      Java version: 24-ea, vendor: Oracle Corporation, runtime: /Users/khm/.sdkman/candidates/java/24.ea.13-open
      Default locale: en_DE, platform encoding: UTF-8
      OS name: "mac os x", version: "14.6.1", arch: "aarch64", family: "mac"
      

      Also opened an issue on JLine3 Project: https://github.com/jline/jline3/issues/1067

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              khmarbaise Karl Heinz Marbaise
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: