nashorn/samples/shell.js
changeset 28785 a503c972d4bd
parent 26067 b32ccc3a76c9
child 28881 0008daeef352
--- 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();