I try to build a program that execute shred with java process builder under SLES10.
Could anyone tell me, why the following code sample does not work? I get every time "no success"
ProcessBuilder builder = null;
builder = new ProcessBuilder("shred", "/opt/temp/testfile.txt");
builder.directory(new File(sfd.filePath));
try {
Process proc = builder.start();
proc.waitFor();
if (proc.exitValue() == 0)
/*DEUB*/System.out.println("success");
else
/*DEUB*/System.out.println("no success");