org.python.util
Class jython
java.lang.Object
org.python.util.jython
public class jython
- extends Object
Method Summary |
static void |
main(String[] args)
|
static void |
run(String[] args)
|
static void |
runJar(String filename)
Runs a JAR file, by executing the code found in the file __run__.py,
which should be in the root of the JAR archive. |
static void |
shutdownInterpreter()
Run any finalizations on the current interpreter in preparation for a SytemRestart. |
shouldRestart
public static boolean shouldRestart
jython
public jython()
runJar
public static void runJar(String filename)
- Runs a JAR file, by executing the code found in the file __run__.py,
which should be in the root of the JAR archive.
Note that the __name__ is set to the base name of the JAR file and not
to "__main__" (for historic reasons).
This method do NOT handle exceptions. the caller SHOULD handle any
(Py)Exceptions thrown by the code.
- Parameters:
filename
- The path to the filename to run.
main
public static void main(String[] args)
run
public static void run(String[] args)
shutdownInterpreter
public static void shutdownInterpreter()
- Run any finalizations on the current interpreter in preparation for a SytemRestart.
Jython homepage