This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Here's some code that I've used to run an executable and pass in command line arguments.
Runtime rt = Runtime.getRuntime(); Process prcs = rt.exec("/prd1/exe/udms mod 4rw salary gen con <infile.txt >/dev/null"); prcs.waitFor();
In this example, udms is the executable, the rest of it is command line arguments particular to this application. Hopefully this will help you get started. You're also going to have to handle IOException and InterruptedException. Hope this helps.
Joined: Aug 16, 2000
thanks for your prompt reply!! it's exactly what i wanted.