This was reported via nashorn-dev openjdk alias. http://mail.openjdk.java.net/pipermail/nashorn-dev/2015-February/004204.html
Email content here for reference:
Hi
How can I avoid string interpolation in here documents with Nashorn? In
other words: what if the here document contains the literal string
"${a}"? The user guide section on here documents [1] doesn't tell how to
do this.
If this is not available yet, shall I create a bug report for this?
Kind regards, Anthony
[1]
http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn/shell.html#sthref26