Pass arguments to command prompt


I can successfully open the command prompt

var shell = require('shell');

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.


To whom it may concern
I went with writing my own .bat file that opens the cmd
and obviously I can do what I need to with the cmd in the .bat file.