Can not get some service in JavaXPCOM
Jason <[email protected]> Tue, 29 Jul 2008 22:59:50 -0700 (PDT)
| Newsgroups | gmane.comp.mozilla.devel.java |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <1b5f5cef-420e-4420-9313-65a53d397681__26048.1261801489$1217398849$gmane$org@z11g2000prl.googlegroups.com> |
Hello, everybody
I am working on JavaXPCOM now, but I have some trouble with
Extension Manager. I can't get the nsIExtensionManager interface in
following code:
nsIExtensionManager em =
(nsIExtensionManager)serviceManager.getServiceByContractID("@mozilla.org/
extensions/manager;1", nsIExtensionManager.NS_IEXTENSIONMANAGER_IID);
I got such error:
"getServiceByContractID" returned an error condition (0x80570016)
When I try to look into the problem, I discovered that I couldn't get
many service interfaces, such as nsIXULAppInfo of "@mozilla.org/xre/
app-info;1" component.
I would be appreciated if you could give me some advice, such as:point
out my fault and the reason.
Best wishes.