问题
I'm trying to create an SWT Browser widget of the SWT.MOZILLA type under windows 8 64Bit with SWT 4.3 64Bit.
According to this, SWT 4.3 should support 64 Bit version on XULRunner 10.x or 24.x
So, I have downloaded both the 10.x and 24.x 64 versions from here and unzipped under c:\xulrunner10
and c:\xulrunner24
respectively.
If I start my java app pointing to xulrunner10 (using the VM argument -Dorg.eclipse.swt.browser.XULRunnerPath=C:\xulrunner10
) it works, however if I try with xulrunner24 (using the VM argument -Dorg.eclipse.swt.browser.XULRunnerPath=C:\xulrunner24
) I get the follwoing error:
Exception in thread "main" org.eclipse.swt.SWTError: XPCOM error 0x80004005
at org.eclipse.swt.browser.Mozilla.error(Unknown Source)
at org.eclipse.swt.browser.Mozilla.initXULRunner(Unknown Source)
at org.eclipse.swt.browser.Mozilla.create(Unknown Source)
at org.eclipse.swt.browser.Browser.<init>(Unknown Source)
I also noticed that I get the same error if pointing to unexisting directory, however the folder c:\xulrunner24 exists and contains all the files as well as xulrunner.exe.
How can I make xulrunner 24.x 64bit embeddable in my swt 4.3 app?
回答1:
Got it! It's an error on SWT wiki: xulrunner 24.x requires SWT 4.4. I've installed swt-4.4M5 and now I can embed xurlrunner 24 64bit
回答2:
Looks like this might be Eclipse bug 411996 (same error and stack trace).
回答3:
I realize that this question is old and already has an accepted answer, but the download location mentioned in the question is no longer valid (http://wiki.mozilla-x86-64.com/Download), and the same issue has been posted about several times.
With 64-bit 4.3 SWT I was able to fix this exception by using XULRunner version 1.9.2.25 runtimes. Originally I found the download from here: https://osdn.net/projects/sfnet_runawfe/downloads/SRC%20and%20BIN%20files/extras/xulrunner-1.9.2.25-win64.zip/
However, I have also re-hosted it as xulrunner-1.9.2.25.en-US.win64.zip.
Full explanation posted in my answer here: https://stackoverflow.com/a/44848877/3300205
来源:https://stackoverflow.com/questions/21378295/creating-a-swt-mozilla-browser-on-windows-64-bit-and-swt-4-3