See: Description
Package | Description |
---|---|
org.netbeans.api.scripting |
Use powerful
scripting
in your applications. |
org.netbeans.spi.scripting |
Implement
EngineProvider to
dynamically add new engine factories . |
This module provides a wrapper around JDK's ScriptEngineManager
that is aware of NetBeans specific extensions. Please see the
scripting tutorial
to read about many interesting use-cases.
Use Scripting.newBuilder().build() to obtain enhanced and secured version of ScriptEngineManager.
Use Scripting.createManager() to obtain enhanced version of ScriptEngineManager that can work well with GraalVM languages registered via EngineProvider
createManager()
method that
should be used whenever one needs an instance of
ScriptEngineManager
inside of NetBeans based application.
To register additional scripting engine, just include its JAR file in
the application. Its factory registration in META-INF/services/javax.script.ScriptEngineFactory
will be found and used by
Scripting
factory methods. Alternatively you can implement and register
EngineProvider
as in the dynamic registration use-case.
In any case don't forget to advertise your engine to the
runtime container
via OpenIDE-Module-Providers: javax.script.ScriptEngine."engineName"
tag as specified by manifest registration
API.
|
|
The sources for the module are in the Apache Git repositories or in the GitHub repositories.
XXX no answer for deploy-dependencies
Read more about the implementation in the answers to architecture questions.