10

I'm trying to embed a WebKit browser in my Java app. I insist on WebKit, because I don't want to test my HTML5/CSS/Javascript with every browser that, for instance, the Browser widget in the Eclipse SWT library supports.

Is there a way to do this on Mac, Windows and Linux, and thus make sure that my web pages are rendered inside my Java app uniformly?

1

2 Answers 2

6

Since SWT 3.7 M5, the Browser widget can use WebKit on all platforms if created with the SWT.WEBKIT flag. Platform-specific conditions may apply: see http://www.eclipse.org/swt/faq.php#howusewebkit.

Sign up to request clarification or add additional context in comments.

2 Comments

This is not a great option due to the requirements: Windows: 32-bit SWT, Safari must be installed Linux: WebKitGTK 1.2.0 or newer must be in the library load path. Examples of Linux distros that meet this requirement by default include Red Hat Enterprise Linux 6 and Ubuntu 10.04. OS X: No additional runtime requirements, the default renderer is WebKit-based. Windows requires safari to be installed? Not many people have this.
@Joe It's least impractical I found. Feel free to suggest other solutions.
2

JXBrowser is one option. It's including Safari.

WebKit 4 SWT is close to what you need but only work on Windows for now.

4 Comments

JxBrowser is very expensive... and from their website I read "JxBrowser supports integration with Internet Explorer and Mozilla (corresponding FireFox 3) under Windows, Apple Safari and Mozilla under Mac OS X, and Mozilla under Linux". So no WebKit for all platforms. Maybe a façade for the SWT Browser widget using WebKit on Mac and Linux, and the WebKit4SWT widget you mention for Windows would be a solution.
I used JxBrowser before and it's not truly cross platform and very slow to updates and lacks documentation. I forked out $2000 for it and overall experience was very bad as it's still buggy after two years and you must continue to pay license fee to get more updates....
Can You give some example for webkit.
@BasK You can find up to date example on their website: teamdev.com/downloads/jxbrowser/docs/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.