Does Java Nashorn support JavaScript template strings ?
I get the following error when trying var a = `this is a \n multiline string \n `
:
javax.script.ScriptException: <eval>:1:22 Expected an operand but found error
With Nashorn "scripting mode" (enabled by -scripting option with jjs and also -Dnashorn.args system property can be used for javax.script to set options), there is a Nashorn specific extension for multiline strings and string interpolation.
See also:
As mentioned, ES6 features are being added to jdk9. You can enable es6 features (subset) using --language=es6 option