org.python.util
Class jython
java.lang.Object
org.python.util.jython
public class jython
- extends java.lang.Object
Method Summary |
static void |
main(java.lang.String[] args)
|
static void |
run(java.lang.String[] args)
|
static void |
runJar(java.lang.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. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
shouldRestart
public static boolean shouldRestart
jython
public jython()
runJar
public static void runJar(java.lang.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(java.lang.String[] args)
run
public static void run(java.lang.String[] args)
shutdownInterpreter
public static void shutdownInterpreter()
- Run any finalizations on the current interpreter in preparation for a SytemRestart.
Jython homepage