Executing native processes from Java
September 17th, 2008
This is kind of a coincidence. Today I got contacted by a friend, wondering how to run a native Windows program from within Java. I said as I usually do: Google it
. Not liking to get that served myself, I did follow up with some real information. I don’t like being a RTFM slinging jerk, but it is fun to sting people you know.
Googling turned up a useful guide to how you can do this, both using Runtime.getRuntime().exec(”command”);
and with 1.5’s ProcessBuilder
.
Then comes the coincidence; just as I’m about to leave for home, I scan my feeds - at the top of my Programming
folder, Patrick Kua has the following entry: Executing native processes in Java on Windows.
