In nashorn openjdk repository http://hg.openjdk.java.net/jdk9/dev/nashorn,
there is a script called "fxmlrunner.js" in the "samples" directory. This script can accept any FXML file as command line argument and "run it". If that FXML file has event handlers written in (nashorn) javascript, then we can have complete runnable application without having to write any Java code!
When I came across this FXML example https://github.com/halcat0x15a/calculator/blob/master/src/calculator/calculator.fxml, I wanted to replace Java event handling + actual calculator implementation with nashorn scripts. The "ported" FMXL+nashorn script app. uses nashorn scripts for action handlers and uses "eval" to implement calculator back-end.
Calculator App in FXML + nashorn scripts
jjs -fx fxmlrunner.js -- calc.fxml
www.oracleonlinetraining.com is providing Oracle APPS Functional and Technical training contact us:+91-9533456356,
by real time experts in USA,UK,Canada,Australia.
Oracle apps finance online training,oracle Apps SCM online training,Oracle apps technical online training,oracle Apps 11g online training,Oracle apps manufacturing training,
Oracle Apps Supply Chain Management training.
Forfull course details please visit our website http://oracleonlinetraining.com/
I'm unable to start the example, I get this error:
Caused by: jdk.nashorn.internal.runtime.ParserException: fxmlrunner.js:1:0 Expected an operand but found <
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
If you did a "save" on that fxmlrunner.js link, most likely you got a HTML file back from the openjdk server. I suggest you view the fxmlrunner.js script in your browser and cut-paste the content as a text file.