Iam using xulrunner1.8.1.3 version.

Iam trying to use nsIProcess from my java application to execute
ps2pdf with two arguments.

String command= "ps2pdf";
String[] args =  new String[2];
args[0]="./temp.ps";
args[1]="./temp.pdf";

nsILocalFile localFile =
(nsILocalFile)factory.componentManager.createInstanceByContractID("@mozilla.org/
file/local;1",null,nsILocalFile.NS_ILOCALFILE_IID);
            localFile.initWithPath(command);
            nsIProcess process
=(nsIProcess)factory.componentManager.createInstanceByContractID("@mozilla.org/
process/util;1",null,nsIProcess.NS_IPROCESS_IID);
            process.init(localFile);
            process.run(true, args, args.length);

Iam always getting usage becos arguments are not getting passed.

Is this a known issue or am i missing something?

thanks in advance,
Krithika

_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to