With the Rhino library you extend/implement classes/interfaces to make them accessible from the JavaScript code. So the JavaScript syntax is just a wrapped around the real Java world.
Or you could think to something like JasperReports' solution. They store the report ( including expressions with own syntax and Java code ) in a an XML file. Then just convert the XML file into Java source code, compile it, load it and execute it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.