The easiest way to run JyStilts is to download the standalone
jystilts.jar
file from the STILTS web page,
and simply run
java -jar jystilts.jarThis file includes jython itself and all the STILTS and JyStilts classes. To use the JyStilts commands, you will need to import the stilts module using a line like "
import stilts
"
from Jython in the usual Python way.
Alternatively, you can run JyStilts from an existing Jython installation
using just the stilts.jar
file.
First, make sure that Jython is installed;
it is available from http://www.jython.org/,
and comes as a self-installing jar file.
JyStilts has been tested, and appears to work, with jython version 2.7.2.
It also works with jython 2.5.* under Java 8 and Java 11,
but jystilts with jython 2.5.* and Java 17 can fail with security problems.
Some earlier versions of JyStilts worked with jython 2.2.1,
but that no longer seems to be the case; it might be possible
to reinstate this if there is some pressing need.
To use JyStilts, you then just need to
start jython with the stilts.jar
file on your classpath,
for instance like this:
jython -J-classpath /some/where/stilts.jaror (C-shell):
setenv CLASSPATH /some/where/stilts.jar jython
Optionally, you can extract the stilts.py
module
from the stilts.jar file
(using a command like "unzip stilts.jar stilts.py
")
and put it in a directory on your jython
sys.path
(e.g. jythondir/Lib
);
this may cause jython to compile it to bytecode (stilts$py.class
)
and thus improve startup time.
Note that in this case you will still need the stilts.jar
file on your classpath as above.