简体   繁体   中英

Creating a SWT.MOZILLA browser on Windows 64 bit and SWT 4.3

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?

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

看起来这可能是Eclipse bug 411996 (相同的错误和堆栈跟踪)。

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM