- java.lang.Object
- 
- jdk.nashorn.api.scripting.NashornScriptEngineFactory
 
- 
- All Implemented Interfaces:
- ScriptEngineFactory
 
 @Deprecated(since="11", forRemoval=true) public final class NashornScriptEngineFactory extends Object implements ScriptEngineFactory Deprecated, for removal: This API element is subject to removal in a future version.Nashorn JavaScript script engine and APIs, and the jjs tool are deprecated with the intent to remove them in a future release.JSR-223 compliant script engine factory for Nashorn. The engine answers for:- names "nashorn","Nashorn","js","JS","JavaScript","javascript","ECMAScript", and"ecmascript";
- MIME types "application/javascript","application/ecmascript","text/javascript", and"text/ecmascript";
- as well as for the extension "js".
 getScriptEngine(String[])will have the passed arguments accessible as a global variable named"arguments".- Since:
- 1.8u40
 
- 
- 
Constructor SummaryConstructors Constructor Description NashornScriptEngineFactory()Deprecated, for removal: This API element is subject to removal in a future version.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ScriptEnginegetScriptEngine(ClassLoader appLoader)Deprecated, for removal: This API element is subject to removal in a future version.Create a new Script engine initialized with the given class loader.ScriptEnginegetScriptEngine(String... args)Deprecated, for removal: This API element is subject to removal in a future version.Create a new Script engine initialized with the given arguments.ScriptEnginegetScriptEngine(String[] args, ClassLoader appLoader)Deprecated, for removal: This API element is subject to removal in a future version.Create a new Script engine initialized with the given arguments and the given class loader.ScriptEnginegetScriptEngine(String[] args, ClassLoader appLoader, ClassFilter classFilter)Deprecated, for removal: This API element is subject to removal in a future version.Create a new Script engine initialized with the given arguments, class loader and class filter.ScriptEnginegetScriptEngine(ClassFilter classFilter)Deprecated, for removal: This API element is subject to removal in a future version.Create a new Script engine initialized with the given class filter.- 
Methods declared in class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods declared in interface javax.script.ScriptEngineFactorygetEngineName, getEngineVersion, getExtensions, getLanguageName, getLanguageVersion, getMethodCallSyntax, getMimeTypes, getNames, getOutputStatement, getParameter, getProgram, getScriptEngine
 
- 
 
- 
- 
- 
Method Detail- 
getScriptEnginepublic ScriptEngine getScriptEngine(ClassLoader appLoader) Deprecated, for removal: This API element is subject to removal in a future version.Create a new Script engine initialized with the given class loader.- Parameters:
- appLoader- class loader to be used as script "app" class loader.
- Returns:
- newly created script engine.
- Throws:
- SecurityException- if the security manager's- checkPermissiondenies- RuntimePermission("nashorn.setConfig")
 
 - 
getScriptEnginepublic ScriptEngine getScriptEngine(ClassFilter classFilter) Deprecated, for removal: This API element is subject to removal in a future version.Create a new Script engine initialized with the given class filter.- Parameters:
- classFilter- class filter to use.
- Returns:
- newly created script engine.
- Throws:
- NullPointerException- if- classFilteris- null
- SecurityException- if the security manager's- checkPermissiondenies- RuntimePermission("nashorn.setConfig")
 
 - 
getScriptEnginepublic ScriptEngine getScriptEngine(String... args) Deprecated, for removal: This API element is subject to removal in a future version.Create a new Script engine initialized with the given arguments.- Parameters:
- args- arguments array passed to script engine.
- Returns:
- newly created script engine.
- Throws:
- NullPointerException- if- argsis- null
- SecurityException- if the security manager's- checkPermissiondenies- RuntimePermission("nashorn.setConfig")
 
 - 
getScriptEnginepublic ScriptEngine getScriptEngine(String[] args, ClassLoader appLoader) Deprecated, for removal: This API element is subject to removal in a future version.Create a new Script engine initialized with the given arguments and the given class loader.- Parameters:
- args- arguments array passed to script engine.
- appLoader- class loader to be used as script "app" class loader.
- Returns:
- newly created script engine.
- Throws:
- NullPointerException- if- argsis- null
- SecurityException- if the security manager's- checkPermissiondenies- RuntimePermission("nashorn.setConfig")
 
 - 
getScriptEnginepublic ScriptEngine getScriptEngine(String[] args, ClassLoader appLoader, ClassFilter classFilter) Deprecated, for removal: This API element is subject to removal in a future version.Create a new Script engine initialized with the given arguments, class loader and class filter.- Parameters:
- args- arguments array passed to script engine.
- appLoader- class loader to be used as script "app" class loader.
- classFilter- class filter to use.
- Returns:
- newly created script engine.
- Throws:
- NullPointerException- if- argsor- classFilteris- null
- SecurityException- if the security manager's- checkPermissiondenies- RuntimePermission("nashorn.setConfig")
 
 
- 
 
-