0

I use org.eclipse.swt.browser of mozilla with xulrunner to load web content,but i get error:
Unhandled event loop exception XPCOM error -2147467261
My develop enviroment:
OS: win7 * 32bit
Eclipse : 3.7.2 * 32bit
SWT: 32bit
xulrunner : release 18.0
Code like this:

//register xulrunner path
static{
     System.setProperty("org.eclipse.swt.browser.XULRunnerPath", "F:/soft/xulrunner18/xulrunner"); 
   }
...

//create Mozilla browser
browser = new Browser(parent, SWT.MOZILLA);  //error was caused here.

Anybody know why,or tell me how to find the cause?
Thanks very much

cumtkml
  • 33
  • 6

1 Answers1

1

Apparently, SWT.Browser doesn't work with Xulrunner 17+ yet.

You can get a standalone copy of version 10esr here: http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/10.0.4esr/runtimes/

You'll then need to specify the xulrunner path in the run configuration arguments: -Dorg.eclipse.swt.browser.XULRunnerPath=C:\path\to\xulrunner\

  • @user2116583 thanks user2116583. Through testing,it can work with xulrunner-3.6.28- with no error,higher version will cause XPCOM error.But,strangely,with Xulrunner3.6.28 it can't load mxGragh(https://www.draw.io/) test webcontent which requires firefox 3+,becuase Xulrunner3.6.28 match firefox3.6.AnyBody konw why? – cumtkml Feb 28 '13 at 06:47