SWT.WebKit doesn't load: No More Handles - [Safari must be installed to use a SWT.WEBKIT-style Browser]

耗尽温柔 提交于 2019-12-06 09:17:18

问题


I'm having trouble using SWT.WEBKIT as the Browser for a SWT-Based Java app, and I am now getting this stacktrace upon starting the application on a new machine:

Exception in thread "main" org.eclipse.swt.SWTError: No more handles [Safari mus
t be installed to use a SWT.WEBKIT-style Browser]
        at org.eclipse.swt.SWT.error(Unknown Source)
        at org.eclipse.swt.browser.WebKit.create(Unknown Source)
        at org.eclipse.swt.browser.Browser.<init>(Unknown Source)
        [...]

Now, I did follow all the steps from the SWT FAQ on how to use Webkit; Safari is installed, the JVM is 32-Bit (just as Safari is, too), and this is running on a Windows XP 64Bit machine. The weird thing is that it works fine on another WindowsXP 64bit machine! Any ideas on how to debug this?

EDIT: It seems that there is a Bug concerning Java 1.7.0u6 and higher supplying their own libxml2.dll which Java tries to load before Webkit's own libxml2.dll. Check out this bugreport for more: https://bugs.eclipse.org/bugs/show_bug.cgi?id=388469


回答1:


The reason is that Apple moved the "Apple Application Support" folder in the latest Safari installers from

C:\Program Files (x86)\Common Files\Apple\Apple Application Support\

to

C:\Program Files (x86)\Common Files\Apple\.

SWT simply cannot find it (see this bug).

There are two workarounds until SWT support of the new folder is added:

  • Install Apple QuickTime or iTunes - they still place "Apple Application Support" in C:\Program Files (x86)\Common Files\Apple\
  • Or add APPLE_INSTALLATION_DIR\Apple Application Support\ to the PATH environment variable



回答2:


It turns out that the problem was that the Safari installation didn't install the Apple Application Support; after carefully comparing the two machines I found an Installer, copied it over and ran it, and voila, the error is gone.

Anybody know anything about this? Also, could anybody help me out with a (legit) link to this installer, for future reference and updates (no, google didn't help)?



来源:https://stackoverflow.com/questions/9808436/swt-webkit-doesnt-load-no-more-handles-safari-must-be-installed-to-use-a-sw

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!