From Terminal, I can run a command line program in ubuntu. The following would be the command line:
sudo /home/wksadmin/Private/MyProgram.bin hostname username password &. The program requires "programName with args hostname username password &.
I wrote the following that works but I don't want to call the program from a bash file:
I need to prompt first for username, then password, then insert it into the line below but when I tried to write the line directly, it doesn't run.
I want to run Process proc = Runtime.getRuntime().exec("sudo /home/wksadmin/Private/myprogram.bin hostname username password &");