java - How to get file resources of a JavaFX WebEngine -



java - How to get file resources of a JavaFX WebEngine -

i pretty new javafx , i'm using code (https://docs.oracle.com/javafx/2/swing/simpleswingbrowser.java.htm) implement simple web view javafx. i'm not able files (html, css, images, javascript files, cookies, , on) create web page.

how can access files, can work them?

you can load html using next methods. js, css , other files linked in html loaded along it.

webengine.load(getclass().getresource("/location/to-your-file.html").toexternalform());

if have file in local drive, can use:

string url = new url("file:///" + ""/location/to-your-file.html").toexternalform(); webengine.load(url);

java javafx-2 javafx-webengine

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -