nashorn/samples/javashell.js
changeset 28881 0008daeef352
parent 28785 a503c972d4bd
--- a/nashorn/samples/javashell.js	Tue Feb 10 13:10:07 2015 +0300
+++ b/nashorn/samples/javashell.js	Thu Feb 12 16:43:33 2015 +0100
@@ -40,7 +40,6 @@
 var Arrays = Java.type("java.util.Arrays");
 var BufferedReader = Java.type("java.io.BufferedReader");
 var FileWriter = Java.type("java.io.FileWriter");
-var List = Java.type("java.util.List");
 var LocalDateTime = Java.type("java.time.LocalDateTime");
 var InputStreamReader = Java.type("java.io.InputStreamReader");
 var PrintWriter = Java.type("java.io.PrintWriter");
@@ -122,7 +121,7 @@
 // execute code command
 function exec(args) {
     // build child process and start it!
-    new ProcessBuilder(Java.to(args.split(' '), List))
+    new ProcessBuilder(Arrays.asList(args.split(' ')))
          .inheritIO()
          .start()
          .waitFor();