Differences between revisions 5 and 16 (spanning 11 versions)
Revision 5 as of 2009-06-08 20:39:19
Size: 2400
Comment:
Revision 16 as of 2014-06-17 03:14:47
Size: 2356
Editor: AdamBurke
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
.. |stable.installer.jar| replace:: jython_installer-2.2.1.jar .. |stable.installer.jar| replace:: jython_installer-2.5.2.jar
Line 5: Line 5:
.. _stable.download: http://downloads.sourceforge.net/jython/jython_installer-2.2.1.jar .. _stable.download: http://sourceforge.net/projects/jython/files/jython/2.5.2/jython_installer-2.5.2.jar/download
Line 14: Line 14:
Jython 2.5.x and 2.2.x Jython 2.5.2 and 2.2.x
Line 20: Line 20:
Jython 2.2.1 is distributed as an executable jar file installer. After Jython 2.5.2 and 2.2.1 are distributed as executable jar file installers. After
Line 29: Line 29:
consoler installer on headless systems. To force the installer to
work in headless mode invoke the installer with a console switch
console installer on headless systems. To force the installer to
work in headless mode invoke the installer as:
Line 40: Line 40:
selected. There's a script in the install directory, jython on Unix
like systems or jython.bat on Windows, that will start up the Jython
console which can be used to dynamically explore Jython and the Java
runtime.
selected. Executing a script in the install directory, ``jython`` on Unix-like systems or ``jython.bat`` on Windows, will start up the Jython
console, which can be used to dynamically explore Jython and the Java
runtime, or to run Jython scripts.
Line 50: Line 49:
You can try it out by downloading the installer from here_

.. _here
: stable.download_

running it like so:
You can try it out by running the installer:
Line 60: Line 55:
And when you come to the "Installation type" page, select "Standalone". then when you come to the "Installation type" page, select "Standalone".
Line 62: Line 57:
When the installation is done, you will have a jython.jar with the /Lib files included that can be run like this: :: The installation will generate a ``jython.jar`` with the Python standard library (``/Lib``) files included, which can be run as: ::
Line 66: Line 61:
You will get a jython prompt with no caching. Of course you can run scripts just by calling them as you might expect: :: Of course you can run scripts just by calling them as you might expect: ::
Line 70: Line 65:
And you can add this jar to the classpath of your app, which will allow standard imports. Or, add this file to the classpath of your application.
Line 75: Line 70:
You can get a list of the installer options by running: You can get a list of installer options (to install Jython unattended, for example) by running:

Installation

Jython 2.5.2 and 2.2.x

Basic Install

Jython 2.5.2 and 2.2.1 are distributed as executable jar file installers. After downloading it, either double click the jython_installer-2.5.2.jar or run java with the -jar option

java -jar jython_installer-2.5.2.jar

This will start the regular GUI installer on most systems, or a console installer on headless systems. To force the installer to work in headless mode invoke the installer as:

java -jar jython_installer-2.5.2.jar --console

The installer will then walk through a similar set of steps in graphical or console mode: showing the license, selecting an install directory and JVM and actually copying Jython to the filesystem. After this completes, Jython is installed in the directory you selected. Executing a script in the install directory, jython on Unix-like systems or jython.bat on Windows, will start up the Jython console, which can be used to dynamically explore Jython and the Java runtime, or to run Jython scripts.

Standalone mode

The standalone option does no caching and so avoids the startup overhead (most likely at the cost of some speed in calling Java classes, but I have not profiled it)

You can try it out by running the installer:

$ java -jar jython_installer-2.5.2.jar

then when you come to the "Installation type" page, select "Standalone".

The installation will generate a jython.jar with the Python standard library (/Lib) files included, which can be run as:

$ java -jar jython.jar

Of course you can run scripts just by calling them as you might expect:

$ java -jar jython.jar script.py

Or, add this file to the classpath of your application.

Installation options

You can get a list of installer options (to install Jython unattended, for example) by running:

$ java -jar jython_installer-2.5.2.jar --help

InstallationInstructions (last edited 2017-07-18 18:56:50 by JeffAllen)