public interface IScript
Interface for JEB scripts. Supported languages: Python, Java.
The class implementing IScript must be public and have the exact same name as the script file. A user may execute a script via the File menu or using the command line flag "--script=...".
Depending on the running mode (UI or Automation), methods and/or classes become available or unavailable. See the documentation for each class.
The run()
method is called by JEB when the script is executed.
The JebInstance
object argument provides a set of methods and objects usable by the script.
Boilerplate Python script (TestScript.py):
from jeb.api import IScript class TestScript(IScript): def run(self, jeb): jeb.print("Hello, JEB")
Boilerplate Java script (TestScript.java):
import jeb.api.IScript; import jeb.api.JebInstance; public class TestScript implements IScript { public void run(JebInstance jeb) { jeb.print("Hello, JEB"); } }
Caveat: with Python scripts, the standard output is connected to the logger (console). It is not the case with Java scripts. This means that Java scripts must explicitly use JebInstance.print in order to write to the console.
JebInstance
Modifier and Type | Method and Description |
---|---|
void |
run(JebInstance instance)
Script entry point.
|
void run(JebInstance instance)
Script entry point.
instance
- an instance representing the currently running JEB