简体   繁体   English

java shell 脚本问题

[英]java shell script question

I am developing a license Generation tool in java.I required to call a shell script from my java program which is license generation tool and after that I have to send command to license generation tool which takes a xml as a input but I am unable to do it please help me I am developing a license Generation tool in java.I required to call a shell script from my java program which is license generation tool and after that I have to send command to license generation tool which takes a xml as a input but I am unable to请帮帮我

Runtime.getRuntime().exec("here_you_add_your_shell_commands");

Try,尝试,

ProcessBuilder prBuilder = new ProcessBuilder(your_script/command, arg1, arg2);
prBuilder = prBuilder.directory(your_working_dir);
Process p = prBuilder.start();

Thnaks.谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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