![]() |
|
#1
|
|||
|
|||
|
running jar file with argument in HTML page using javascript gives error - Component returned failure code: 0x80520003 (NS_ERROR_FILE_EXECUTION_FAILED) [nsIProcess.run] while the same script runs fine for exe files. Relevant portion of script is as under
function runGecko(prog, args) ** try ** pm = netscape.security.PrivilegeManager. enablePrivilege('UniversalXPConnect'); file = Components.classes['@mozilla.org/file/local;1']. createInstance(Components.interfaces.nsILocalFile) ; file.initWithPath(prog); if ((typeof args == 'string') && (args != '')) ** ps = Components.classes['@mozilla.org/process/util;1']. createInstance(Components.interfaces.nsIProcess); ps.init(file); ps.run(false, [args], 1); } else ** file.launch(); } } catch (e) ** window.alert(e.message); } } oops, ** are left curly brackets |