Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8210140

Java 11 migration guide : Provide simple indication to remove Nashorn warning

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 12
    • Component/s: docs
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      A DESCRIPTION OF THE PROBLEM :
      Nashorn JavaScript engine is deprecated since Java 11 (and scheduled for removal), http://openjdk.java.net/jeps/335.

      If Nashorn ScriptEngine is used in any Java application the following warning is logged (since https://bugs.openjdk.java.net/browse/JDK-8205594 / https://bugs.openjdk.java.net/browse/JDK-8204492) :
      "Warning: Nashorn engine is planned to be removed from a future JDK release "

      The JDK 11 release notes http://jdk.java.net/11/release-notes indicate the following :
        "To disable this runtime warning message, users can include the new Nashorn option, --no-deprecation-warning."

      Problem :
      1. As far as I am concerned, this indication is very vague and requires knowledge of how nashorn options should be specified. Which is described in another technical notes : https://wiki.openjdk.java.net/display/Nashorn/Nashorn+jsr223+engine+notes
      2. I would expect a migration guide to clearly indicate what actions can be implemented by operators to remove a warning, without having to dig deep other documentation (exactly like it was provided in the JDK 9 migration guide for other warning https://docs.oracle.com/javase/9/migrate/toc.htm )

      Requested improvement :
      Add a clear section in the Java 11 migration guide regarding this subject, without having to look for other documentation.
      For example :
      "
      The Nashorn JavaScript Engine [...] have been deprecated [...].
      The Nashorn engine [...] will print a warning message about deprecation. To disable this runtime warning message, users can include the new Nashorn option, --no-deprecation-warning. [...] [...]
      *** This Nashorn option can be specified as a JVM property using -Dnashorn.args="--no-deprecation-warning" ****
      "


      See discussion with A. Sundararajan on this issue : https://twitter.com/sundararajan_a/status/1030443026810716160


        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rgallard Raymond Gallardo
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: