lesser-equity

Magazine
Go Back   Computer Juice > Computer Software > Web Design, Hosting & SEO


Register


Reply
 
Thread Tools
  #1  
Old 6th Jun 2009, 03:12
New Member Group
 
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
Reply

Register
Thread Tools




Arabic Bulgarian Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Finnish French German Greek Hebrew Hungarian Italian Japanese Korean Latvian Lithuanian Norwegian Polish Portuguese Romanian Russian Serbian Slovak Spanish Swedish Thai Turkish Ukrainian

Copyright ©2006 - 2009 Computer Juice.

Powered by vBulletin® Copyright ©2000 - 2009 Jelsoft Enterprises Ltd. SEO by vBSEO ©2009, Crawlability, Inc.