javascript - How to Run an External jar file from within a firefox extension -
Even I have the code ...
// external Run encryption process var file exe = Components.classes ["@ mozilla.org/file/local;1"] .createInstance (Components.interfaces.nsILocalFile); FileExe.initWithPath ("~ / tmp / Encrypt.jar"); Var Process = Component. Classes ["@MOZILOGG / PROCESS / UTL; 1"] .Corate Instructions (Components Enerfus. NIPPrice); Process.init (fileExe); Var Argis = ["Java-Zer Encrypt.car-A to Encrypt"]; Process.run (true, args, args.length); Document.getElementById ('hello-world-status-bar-icon'). Label = "Done";
Any suggestions that does not currently work ??
Edit I have also tried ..
// Run external encryption process var file axis = component Class ["@ mozilla.org/file/ local; 1"] .createInstance (Components.interfaces.nsILocalFile); FileExe.initWithPath ("Java"); Var Process = Component. Classes ["@MOZILOGG / PROCESS / UTL; 1"] .Corate Instructions (Components Enerfus. NIPPrice); Process.init (fileExe); Var Argz = New Array (); Args [0] = "-zer"; Args [1] = "~ / tmp / encrypt.jar"; Args [2] = "-e"; Args [3] = "to encrypt"; Process.run (true, args, args.length); Document.getElementById ('hello-world-status-bar-icon'). Label = "Done";
Thanks, Pat
I think you have to enter Requires "Java" process with reference to the executable local file. At the system level, it needs to be executed Logic needs to be passed as an array of individual strings, not a single string.
Comments
Post a Comment