I am trying to pass multiple Nashorn arguments when I start a jar, something like this:
java -Dnashorn.args=-scripting -t -jar myjar.jar
The second Nashorn argument -t doesn't seem to be processed, and I get this:
Unrecognized option: -Xt
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
I guess it was considered to be a java argument but that was not my intention, how can I clearly state that it's a Nashorn argument and not a java one?
Note: I'm using java version "1.8.0_144"
I don't think comma separated values work. I looked at the relevant nashorn source code. It uses StringTokenizer with the default delimiter set (which is " \t\n\r\f"). So the following works:
Note that with -t option, a timezone argument has to be passed.