Recently, I was looking at browser embedding and found xulrunner,
Http://developer.mozilla.org/cn/docs/%E5%88%9B%E5%BB%BA_XPCOM_%E7%BB%84%E4%BB%B6:%E4%BD%BF%E7%94%A8_XPCOM_%E7%BB%84%E4%BB%B6
Create an XPCOM component: Use the XPCOM component
Http://developer.mozilla.org/en/docs/nsICookieManager
Nsicookiemanager
How do I obtain cookies?
Http://dev.eclipse.org/newslists/news.eclipse.platform.swt/msg37871.html
Well I got it working, I think I was passing in the wrong id. Here is the Code if anyone else has this problem.
Nsiservicemanager servicemanager = Mozilla. getinstance (). getservicemanager ();
Nsicookiemanager cookiemanager = (nsicookiemanager) servicemanager. getservicebycontractid ("@ override", nsicookiemanager. ns_icookiemanager_iid );
Nsisimpleenumerator cookieenumerator = cookiemanager. getenumerator ();
While (cookieenumerator. hasmoreelements ()){
// Not sure how to get the nsicookie object.
Nsicookie cookie = (nsicookie) cookieenumerator. getnext (). QueryInterface (nsicookie. ns_icookie_iid );
System. Out. println (cookie. getname ());
System. Out. println (cookie. gethost ());
}
If anyone has a place to gather more information for using the javaxpcom other than the XUL planet site I wowould love to know.
Aaron