I am facing a problem, I need to communicate from Java FX application to browser. Prior to that I found info as:
var jsObject = netscape.javascript.JSObject.getWindow(applet);
jsObject.call("show_alert", []);
With this I can access JavaScript function. But my Java FX application is not an applet (not implementing JApplet).
So what could I give as input to getWindow().
Any Suggestion?
Reading the comments it is unclear if you're JavaFX code is running embedded within a web browser page (in other words an applet) or it is some other configuration. However, you should start by using the following.
If this doesn't work then please comment with what's not working and what the specific run-time configuration is.
getHostServices()is a method on a JavaFXApplicationas documented here and here.