简体   繁体   中英

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

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!

wsadmin.bat - lang jacl -f filename

Also see help with -h.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM