-, java.io.FileNotFoundException: image.tiff (Permission denied):
Process process = Runtime.getRuntime().exec("/usr/bin/tiff2pdf -o temp.pdf image.tiff");
int returnCode = process.waitFor();
- , , ( ). process.getErrorStream() (, ). , , FileNotFoundException, , Java .
EDIT, :
, returnCode 1. , root.
. , : returnCode.
-, exec exec String[] , , , , .
, , , . (* EDIT: * , , , rwx /tmp/tiff_dir.)
, sudo Runtime.exec(new String[] {"/usr/bin/sudo", ... the rest of your command ... }, . sudoers, , , (, !) , -.)