nashorn/samples/shell.js
changeset 28881 0008daeef352
parent 28785 a503c972d4bd
--- a/nashorn/samples/shell.js	Tue Feb 10 13:10:07 2015 +0300
+++ b/nashorn/samples/shell.js	Thu Feb 12 16:43:33 2015 +0100
@@ -42,7 +42,6 @@
     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");
 
@@ -67,7 +66,7 @@
                     }
                 } else {
                     // build child process and start it!
-                    new ProcessBuilder(Java.to(args, List))
+                    new ProcessBuilder(Arrays.asList(args))
                         .inheritIO()
                         .start()
                         .waitFor();