Reputation: 548
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
Upvotes: 2
Views: 3004
Reputation: 681
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:
C:\Program Files (x86)\Common Files\Apple\
APPLE_INSTALLATION_DIR\Apple Application Support\
to the PATH environment variableUpvotes: 6
Reputation: 548
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)?
Upvotes: 1