run script file @ nashorn startup
A. Sundararajan
sundararajan.athijegannathan at oracle.com
Thu Feb 20 04:53:13 PST 2014
You can execute it in your main java class of your app. You main class
would look something like:
1) create ScriptEngineManager
2) create Nashorn script engine
3) eval an init script - say myinit.js - which will contain
Object.bindProperties and other init calls
4) eval user script specified in your command line
-Sundar
On Thursday 20 February 2014 06:02 PM, buddhi mihara wrote:
> hi,
> i have a script file call foo.js. this file use to bind properties to global scope using Object.bindProperties(this,propertyObj); i need to execute this file automatically @ nashorn startuphow can i do that?
More information about the nashorn-dev
mailing list