我想知道如何在linux上使用firefox extenion运行一个外部程序,如C程序。我在下面做了什么,我不知道哪里出错,这些代码在windows.please上工作得很好我,非常感谢你!
var file = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsIFile);
file.initWithPath("~//Desktop//a.out");
var process = Components.classes["@mozilla.org/process/util;1"]
.createInstance(Components.interfaces.nsIProcess);
process.init(file);
var args = ["argument1", "argument2"];
process.run(false, args, args.length);