lesser-equity

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

Register


Default NsIProcess giving error while running jar file with argument

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) ...


Reply
 
Thread Tools
  #1  
Old 6th Jun 2009, 03:12
New Member Group
 
Posts: 1
Default NsIProcess giving error while running jar file with argument

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

Donate

Register

Bookmarks

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error moving file from one external hard drive to another dmb Drives & Removable Media 2 22nd Jun 2009 03:51
Fancy an Argument? - Kanoakavirus' Signature 4D(Fordy(Ford) Ollie Off Topic Discussion 7 20th Mar 2009 04:58
There is an unrecoverable disk error on file ~WRL3831 amy Office Suites & Applications 7 2nd Feb 2009 09:35
Error message after running Windows XP Network Diagnostics: HTTP,HTTPs, FTP ariez189 Networking, Modems & VoIP 1 29th Dec 2008 22:18
Computer keeps giving up and restarting Tris Windows Operating Systems 41 15th Feb 2008 17:34
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.