Hi, I am writing a chapter on Nashorn for "Java 8 for the Impatient", which will eventually find its way into one of the Core Java tomes.

I am a bit baffled why one needs to supply -- when calling a script with arguments. I mean, when I put a

#!/usr/bin/jjs

in a script, why can't I just run it as

myScript arg1 arg2 arg3

instead of

myScript -- arg1 arg2 arg3

I know I can solve this with a second script, but it seems a hassle. And is this a new thing? The article http://benjiweber.co.uk/blog/2013/01/27/javascript-shell-scripting-with-nashorn/ doesn't mention it.

Thanks,

Cay

--

Cay S. Horstmann | http://horstmann.com | mailto:[email protected]

Reply via email to