15

Is it possible to render webpages with WebKit through a Java application?

P.S. I want it to be compatible with Windows, Linux and Mac Os X.

Xplane
  • 820
  • 2
  • 8
  • 24

3 Answers3

15

Qt WebKit with Qt Jambi. Supports Windows, Linux and Mac.

gwohpq9
  • 2,143
  • 2
  • 18
  • 18
  • 1
    Jambi appears to be dead. – SwiftsNamesake Mar 13 '16 at 18:47
  • JCEF tracks the most current webkit and I assume JavaFX is fairly up to date. Qt Webkit is 3 years old now and QtJambi may as well be dead as it is rarely developed (though the tiny group working on it is active and willing they are still on Qt 4.8). With recent updates to SSL, more javascript, and a variety of other changes for security,bugs;etc., I would not expect these tools to work reliably much longer. For chromium there is also Selenium but it leaks memory like none other and has a hard time closing when multiple instances are running. – Andrew Scott Evans Apr 12 '16 at 19:48
  • JavaFX WebView is based on WebKit, but as Andrew said it hasn't been updated for years. As alternative solution I recommend that you take a look at JxBrowser library — https://www.teamdev.com/jxbrowser. It's based on Chromium engine and it's updated regularly. JCEF by the way is based on Chromium engine as well. – Vladimir Jul 08 '16 at 10:53
8

In JavaFX is included in Java 7. This contains WebView which is based on WebKit.

http://docs.oracle.com/javafx/2/webview/jfxpub-webview.htm

Rob Mayhew
  • 2,704
  • 3
  • 19
  • 11
  • 5
    JavaFx is one of the worst UI Tool Kits , I have worked with especially Webview/WebEngine. It made my application crash frequently. I wouldn't advise anyone doing any serious work to adopt javafx webview. – Jijoy Oct 09 '14 at 10:53
  • How do I use JavaFX in LWJGL window? Separate WebKit is not the same thing as GUI framework. This doesn't answer the question. – polkovnikov.ph Jun 14 '17 at 02:01
3

WebKit via SWT

Also see

Previously answered question

and

jxBrowser

Community
  • 1
  • 1
MJB
  • 9,352
  • 6
  • 34
  • 49
  • I want it to be compatible with Windows, Linux and Mac Os X. – Xplane May 01 '11 at 18:18
  • Well look at the other links I provided. – MJB May 01 '11 at 18:20
  • thanks but it seems that there is not gonna be a free version that I could use for Java. I'll have to use a different language for this part instead. – Xplane May 01 '11 at 18:23
  • Yes, not too surprising. Webkit is all native code after all. And has evolved rapidly. The combination doesn't make for a very stable JNI wrapper – MJB May 01 '11 at 18:24
  • 1
    BTW you might want to avoid reposting substantially the same question – MJB May 01 '11 at 18:28
  • JxBrowser is commercial. JCEF is an alternative. It works with command line args for Chromium which JxBrowser is using as well. They are both JNI wrappers around Chromium but JxBrowser may have more features and has support staff. – Andrew Scott Evans Apr 12 '16 at 19:51