Run a Bat File on Java with a command line for the bat file

215 views Asked by At

I'm trying to run wsadmin as administrator on Java and I would like to input the jacl script with it as well. How do I do that? This is my current code.

    Runtime rt = Runtime.getRuntime();
    rt.exec("cmd /c start C:\\IBM\\WebSphere\\AppServer\\profiles\\JVMSrv01\\bin\\wsadmin2.bat.lnk");

How would I input, for example, a jacl script file for it to execute right after I have run it as admin?

I am running the wsadmin on my profiles folder so the connection has already been established. Thank you!

1

There are 1 answers

0
Marcin P On

wsadmin.bat - lang jacl -f filename

Also see help with -h.