cumtkml
cumtkml

Reputation: 33

create swt.browser of mozilla with xulrunner occurs error

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

Upvotes: 0

Views: 1369

Answers (1)

user2116583
user2116583

Reputation:

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\

Upvotes: 1

Related Questions