JDK-8210140 : Java 11 migration guide : Provide simple indication to remove Nashorn warning
  • Type: Enhancement
  • Component: docs
  • Sub-Component: guides
  • Affected Version: 11
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2018-08-28
  • Updated: 2019-01-24
  • Resolved: 2019-01-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 12
12Fixed
Related Reports
Relates :  
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