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

print function as defined by jrunscript's init.js script is incompatible with nashorn's definition

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8
    • 8
    • core-libs
    • None
    • b102
    • generic
    • generic

    Description

      Nashorn script engine defines 'print' function that prints newline character at the end. But, init.js script of jrunscript tool overrides the same with a version of 'print' function that does not print newline character at the end. This makes it difficult to write scripts that can run with 'jjs' as well as 'jrunscript' tool.

      Given that other shells (v8, rhino's js.jar) define 'print' function that print newline char at the end and nashorn engine's version also prints 'newline' at the end, jrunscript's init.js should be changed to be consistent.

      Attachments

        Activity

          People

            sundar Sundararajan Athijegannathan
            sundar Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: