Duplicate :
|
|
Duplicate :
|
|
Relates :
|
FULL PRODUCT VERSION : java version "1.8.0_131" Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode) ADDITIONAL OS VERSION INFORMATION : Microsoft Windows [version 6.3.9600] A DESCRIPTION OF THE PROBLEM : Webview of javafx v1.8.0_131 isn't able to display demo page of pdf.js ("https://mozilla.github.io/pdf.js/web/viewer.html"). This works in previous versions of java. REGRESSION. Last worked in version 8u112 REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- //import com.mohamnag.fxwebview_debugger.DevToolsDebuggerServer; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.web.WebEngine; import javafx.scene.web.WebView; import javafx.stage.Stage; public class WebView131Test extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage primaryStage) throws Exception { WebView browser = new WebView(); WebEngine webEngine = browser.getEngine(); webEngine.setOnError(event -> System.err.println(event.getMessage())); webEngine.setOnAlert(event -> System.err.println(event.getData())); webEngine.setJavaScriptEnabled(true); webEngine.load("https://mozilla.github.io/pdf.js/web/viewer.html"); Scene scene = new Scene(browser); primaryStage.setScene(scene); primaryStage.show(); // try{ // DevToolsDebuggerServer.startDebugServer(webEngine.impl_getDebugger(), 51742); // } // catch(Exception e){ // e.printStackTrace(); // } // primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>(){ // @Override // public void handle(WindowEvent event){ // try{ // DevToolsDebuggerServer.stopDebugServer(); // } // catch(Exception e){ // e.printStackTrace(); // } // } // }); } } ---------- END SOURCE ----------
|