Aviva Directory » Computers & Internet » Programming » Python » Jython

Jython is an implementation of the Python programming language designed to run on the Java platform.

Work on Jython began in the late 1990s to replace C with Java for performance-intensive code accessed by Python programs. It was known as JPython until 1999. Its development was moved to SourceForge in late 2000, and the Python Software Foundation awarded a grant for its continued development in 2005.

Its initial release was on January 17, 2001, and a stable release was made on September 10, 2022. It is available under the Python Software Foundation License (PSFL), a BSD-style, permissive software license that is compatible with the GNU General Public License (GPL). Its license is also known as Python License 2.0.1.

The goal of Jython is to combine Python's simplicity, readability, and expressiveness with the vast ecosystem and libraries available in Java. Unlike traditional Python interpreters, Jython compiles Python code into Java bytecode, allowing for seamless integration with existing Java applications and libraries.

Jython inherits the elegant syntax of Python, including its concise, indentation-based structure that encourages clarity and productivity. It runs on the Java virtual machine (VM), allowing Python developers to interact with Java classes and APIs, which allows for embedded scripting, interactive experimentation, and rapid application development. Python programs are typically shorter than equivalent Java code, and Jython's seamless integration with Java allows developers to mix both languages during development and in production. Additionally, Jython adds dynamic features that are not available in standard Java, such as dynamic typing and introspection. This makes it a good choice for scripting and glue code.

While Python is versatile and widely popular among programmers, Jython extends its reach by running on the Java VM. Jython inherits Python's strengths while leveraging Java's mature ecosystem. Python emphasizes readability and conciseness, whereas Java focuses on performance and strict typing. Jython combines the ease of Python with the robustness of Java.

Java developers can enhance their applications by adding Jython libraries, allowing end users to write simple or complex scripts that extend the application's functionality. Jython also offers an interactive interpreter that enables programmers to interact with Java practices or with running Java applications. This can be helpful for experimentation and debugging of Java systems using Python.

Typically, Python programs are from two to ten times shorter than equivalent Java programs. The seamless interaction between Python and Java allows developers to freely mix the two languages.

This portion of our computer programming language guide is on Jython. Online resources pertaining to the language are appropriate for this category, including the official Jython websites, repositories, and documentation, as well as its developer community, tutorials, reviews, or tools and utilities designed to facilitate Jython programming.

The Jai programming language is also known as Jaithon, which has its own category (Jai). Jython and Jaithon are unrelated.



Recommended Resources

Search for Jython on Google or Bing