JavaFX webview shows blank page on certain website


February 2019


2.1k time


i am struggeling with some problem here to load a website into the webviewer.

I followed the code from here and changed it towards

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.Region;
import javafx.scene.paint.Color;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
import javafx.stage.Stage;

public class WebViewSample extends Application {
    private Scene scene;
    @Override public void start(Stage stage) {
          //   create the scene
        scene = new Scene(new Browser(),900,600, Color.web("#666970"));

    public static void main(String[] args){
class Browser extends Region {

    final WebView browser = new WebView();
    final WebEngine webEngine = browser.getEngine();

    public Browser() {

           //  load the web page
          //  add the web view to the scene

It shows me just a blank page. I tried to check for here proxies but aint going anywhere.

Can somebody help me? The website is in german but should not matter.

Or does somebody know how to operate on Websites (opened in a browser, e.g. internet explorer :X ) like it is able to do with VBA?

Thanks in advance!

1 answers


The reason is HTTPS protocol and you have certificate problem

Here are similar problems JavaFX WebView can't load certain sites

JavaFx Webview JDK 8 can not load self signed certificate