Package jdk.nashorn.api.scripting

This package provides the javax.script integration, which is the preferred way to use Nashorn. You will ordinarily do this to obtain an instance of a Nashorn script engine:
import javax.script.*;
 ScriptEngine nashornEngine = new ScriptEngineManager().getEngineByName("Nashorn");

Nashorn script engines implement the optional Invocable and Compilable interfaces, allowing for efficient pre-compilation and repeated execution of scripts. In addition, this package provides nashorn specific extension classes, interfaces and methods. See NashornScriptEngineFactory for further details.