1

I want to display a HTML file in my java GUI. Big problem: this java program has to run on Raspbian (Raspberry Pi).

I used the browser from eclipse swt which worked perfectly on my PC, but there is no swt build for the ARM processor on my RPI...

A JEditorPane is too weak, because I need to display some pages with CSS

Is there any other possibility?

1 Answer 1

1

The easiest solution is of course to see of JavaFX is supported on Raspbian. If it is, then you can use the WebView component (http://docs.oracle.com/javafx/2/webview/jfxpub-webview.htm) and most of your problems will be solved. As pointed out in the comments below by jewelsea, this is not a feasible solution yet. This might change with future builds of JavaFX for Raspbian though, so keep an eye on it.

If, for some reason, JavaFX won't work (due to display drivers etc.) then you might want to reconsider your application approach. If you just need to display the HTML file, then you can write it out to disk and display it in the default system browser. If you need to interact with it, it becomes a bit more complicated - you'd basically write a small web server and then respond to user interaction that way. The user will be using their browser of choice, and you'll send responses back to it.

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

2 Comments

According to OpenJFX on the Raspberry Pi, JDK 8 EA builds for the Raspberry Pi include full support for hardware accelerated graphics, with everything from the base, graphics, controls and FXML modules. Media and Web modules are not included. So JavaFX currently runs on Pi without WebView support.
Ah, thank you for pointing that out - perhaps it will change in the future, but the good news is that a JavaFX style UI is possible.

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.