Java shell script question

I am developing a license generation tool in java.I need to call a script shell from my java program, which is a tool for creating a license, and after that I need to send a command to the license generation tool, which accepts xml as input but I canโ€™t do it , please help me

0
source share
2 answers
Runtime.getRuntime().exec("here_you_add_your_shell_commands");
+2
source

Give it a try

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

Thnaks.

+2
source

All Articles