--- a/nashorn/samples/shell.js Fri Jan 30 15:03:56 2015 +0100
+++ b/nashorn/samples/shell.js Thu Feb 05 19:08:00 2015 +0530
@@ -42,6 +42,7 @@
var Arrays = Java.type("java.util.Arrays");
var BufferedReader = Java.type("java.io.BufferedReader");
var InputStreamReader = Java.type("java.io.InputStreamReader");
+ var List = Java.type("java.util.List");
var ProcessBuilder = Java.type("java.lang.ProcessBuilder");
var System = Java.type("java.lang.System");
@@ -66,7 +67,7 @@
}
} else {
// build child process and start it!
- new ProcessBuilder(Arrays.asList(args))
+ new ProcessBuilder(Java.to(args, List))
.inheritIO()
.start()
.waitFor();