Pass arguments to command prompt


#1

I can successfully open the command prompt

var shell = require('shell');
shell.openItem("cmd.exe");

But is there a way I can pass it arguments, like dir or exit? Obviously I will be doing much more than that, but it’s a start.

What I’m trying to do is call a method in a .java class and that java class is inside a .jar.


#2

To whom it may concern
I went with writing my own .bat file that opens the cmd
shell.openItem("customCMD.bat");
and obviously I can do what I need to with the cmd in the .bat file.