Hi There,
I am using the following code snippet to run a utility called convert to
convert between different image types.
arg[0] = "convert";
arg[1] = "IMG-001.ppm";
arg[2] = "IMG.jpg";
Runtime rt = Runtime.getRuntime();
try {
Process proc = rt.exec(arg);
int exitVal = proc.waitFor();
System.out.println(exitVal);
} catch (IOException ex) {
ex.printStackTrace();
} catch (InterruptedException ex) {
ex.printStackTrace();
}
It works perfectly when I run it in Netbeans. But when I move to
command prompt and try to run this class from there its not working.
Its giving the exit value as 4. When I tried executing the convert
utility from command prompt its works fine. But from java its not
working. Can any body help me with this to understand what is happening
here?
Thanks,
Jose John
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users