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?                          
               

Reply via email to