Using the 64bit XulRunner in Eclipse SWT under Windows

Michael picture Michael · Jan 21, 2013 · Viewed 8.7k times · Source

Is it possible to use the 64bit XulRunner for Windows (available from here) with the Eclipse browser widget? It works fine under 32bit Windows and the answer to this question explains how this works. But when I try this under 64bit Windows I get the following exception:

 org.eclipse.swt.SWTError: No more handles (java.lang.UnsatisfiedLinkError: Could not   
 load SWT library. Reasons: 
   no swt-xulrunner-win32-3834 in java.library.path
   no swt-xulrunner-win32 in java.library.path
   Can't load library: 
     C:\Users\...\.swt\lib\win32\x86_64\swt-xulrunner-win32- 3834.dll
     Can't load library: C:\Users\...\.swt\lib\win32\x86_64\swt-xulrunner-win32.dll
    at org.eclipse.swt.SWT.error(SWT.java:4387)
    at org.eclipse.swt.SWT.error(SWT.java:4276)
    at org.eclipse.swt.browser.Mozilla.initXULRunner(Mozilla.java:2594)
    at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:684)
    at org.eclipse.swt.browser.Browser.<init>(Browser.java:99)
    at org.openlca.ui.BrowserFactory.createMozilla(BrowserFactory.java:52)

Thanks for help, Michael

Edit: I found it in the Eclipse bug-tracker (link here):

swt's 64-bit Windows port does not have xulrunner support because mozilla.org does not provide a 64-bit xulrunner on Windows

But as the last comment on this bug says, there is a 64bit XulRunner available

Answer

Dazed picture Dazed · Apr 13, 2013

So I came here with similar problem: trying to run DJ Project browser within Java Swing - more specifically within that the Mozilla XPCOM Download Manager sample which requires SWT and XULRunner.

Following the eclipse bug link in your OP - I found another (eclipse bugzilla) - looks like this has been a long-standing issue (only 5+ years!!) - which is actually now (as of 11/4/13 - 2 days ago!) fixed.

I have downloaded SWT package from Eclipse nightly builds and I can confirm it does now contain the swt-xulrunner-win32-xxxx.dll. Unfortunately I now have other problems stopping my test working, but thought I'd post what I'd found here.

Edit: Actually my problem now is identical to this XPCOM error 0x80004005