I need to use the dd command for blocking some files, and would rather do it without calling it via shell.
Is there a class library already written, or should I roll my own blocker unblocker?
Basically equivalent to going:
dd if=foo.log of=fooblocked.log cbs=79 conv=block
Runtime.getRuntime().exec()executes the command passed in a shell (a command prompt in Windows) the shell defaults to the programs working directory.If you need the program to wait until the command completes, you can use
p.waitFor().