JDK-8144221 : fix Nashorn shebang argument handling on Mac/Linux
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.
See http://cr.openjdk.java.net/~mhaupt/8144221/proposal.html for a discussion and proposals. Proposal #5 will be implemented.
The original Nashorn behaviour is actually almost as intended. The documentation of the execve function states that the argument to the executable on the shebang line is (1) optional and (2) only one that should not contain any whitespace. Execve is documented at http://linux.die.net/man/2/execve - the relevant section is the one on Interpreter Scripts.