Monday, December 17, 2007

How to run Jython

To run Jython, start by entering the
command:
C:\>c:\jython-2.1\jython
The command should result in an introduction similar to this one:
Jython 2.1 on java1.4.1_01 (JIT: null)
Type "copyright", "credits" or "license" for more information.
Finally, we'll exit Jython. At the Jython prompt, enter the following command:
>>> import sys; sys.exit()
Alternatively, you could just press Ctrl+C two times.

jython is especially suited for the following tasks

Embedded scripting - Java programmers can add the Jython libraries to their system to allow end users to write simple or complicated scripts that add functionality to the application.
Interactive experimentation - Jython provides an interactive interpreter that can be used to interact with Java packages or with running Java applications. This allows programmers to experiment and debug any Java system using Jython.
Rapid application development - Python programs are typically 2-10X shorter than the equivalent Java program. This translates directly to increased programmer productivity. The seamless interaction between Python and Java allows developers to freely mix the two languages both during development and in shipping products.

Read more