private void initEngine ( ) { engine = ( NashornScriptEngine ) new ScriptEngineManager ( ) . getEngineByName ( "nashorn" ) ; try { engine . eval ( "(function(global){global.global = global})(this);" ) ; engine . eval ( NashornVueTemplateCompiler . NASHORN_VUE_TEMPLATE_COMPILER ) ; } catch ( ScriptException e ) { e . printStackTrace ( ) ; } }
Init the Nashorn engine and load the Vue compiler in it .