Jython is an implementation of the
Python programming language
Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation.
Python is dynamically type-checked and garbage-collected. It supports multiple prog ...
designed to run on the
Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
platform. It was known as JPython until 1999.
Overview
Jython programs can import and use any Java class. Except for some standard modules, Jython programs use Java classes instead of Python modules. Jython includes almost all of the modules in the standard
Python programming language
Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation.
Python is dynamically type-checked and garbage-collected. It supports multiple prog ...
distribution, lacking only some of the modules implemented originally in
C. For example, a user interface in Jython could be written with
Swing,
AWT or
SWT. Jython compiles Python source code to
Java bytecode
Java bytecode is the instruction set of the Java virtual machine (JVM), the language to which Java and other JVM-compatible source code is compiled. Each instruction is represented by a single byte, hence the name bytecode, making it a compact ...
(an intermediate language) either on demand or statically.
History
Jython was initially created in late 1997 to replace
C with
Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
for performance-intensive code accessed by Python programs, moving to
SourceForge
SourceForge is a web service founded by Geoffrey B. Jeffery, Tim Perdue, and Drew Streib in November 1999. SourceForge provides a centralized software discovery platform, including an online platform for managing and hosting open-source soft ...
in October 2000. The
Python Software Foundation
The Python Software Foundation (PSF) is an American nonprofit organization devoted to the Python programming language, launched on March 6, 2001. The mission of the foundation is to foster development of the Python community and is responsible fo ...
awarded a grant in January 2005. Jython 2.5 was released in June 2009.
Status and roadmap
The most recent release is Jython 2.7.4. It was released on August 18, 2024 and is compatible with Python 2.7.
Python 3 compatible changes are planned in Jython 3 Roadmap.
Although Jython implements the Python language specification, it has some differences and incompatibilities with
CPython
CPython is the reference implementation of the Python programming language. Written in C and Python, CPython is the default and most widely used implementation of the Python language.
CPython can be defined as both an interpreter and a comp ...
, which is the
reference implementation
In the software development process, a reference implementation (or, less frequently, sample implementation or model implementation) is a program that implements all requirements from a corresponding specification. The reference implementation ...
of Python.
License terms
From version 2.2 on, Jython (including the standard library) is released under the
Python Software Foundation License
The Python Software Foundation License (PSFL) is a BSD-style, permissive software license which is compatible with the GNU General Public License (GPL). Its primary use is for distribution of the Python project software and its documentatio ...
(v2). Older versions are covered by the ''Jython 2.0, 2.1 license'' and the ''JPython 1.1.x Software License''.
The command-line interpreter is available under the Apache Software License.
Usage
*
JBoss Application Server
WildFly, formerly known as JBoss AS, or simply JBoss, is an application server written by JBoss, now developed by Red Hat. WildFly is written in Java and implements the Java Platform, Enterprise Edition (Java EE) specification. It runs on mult ...
's
command line interface
A command-line interface (CLI) is a means of interacting with software via commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user-friendly alternati ...
scripting using Jython
*
Oracle Weblogic Server
Oracle Fusion Middleware (FMW, also known as Fusion Middleware) consists of several software products from Oracle Corporation. FMW spans multiple services, including Java EE and developer tools, integration services, business intelligence, co ...
Scripting Tool uses Jython
* IBM
Rational
Rationality is the quality of being guided by or based on reason. In this regard, a person acts rationally if they have a good reason for what they do, or a belief is rational if it is based on strong evidence. This quality can apply to an ...
development tools allow Jython scripting
* IBM
WebSphere Application Server tool scripting with ''
wsadmin
The wsadmin tool is a command shell for the purpose of performing systems administration on all the artifacts in an IBM WebSphere Application Server (WAS) cell. It gets its name from the name of the shell script that invokes this command shell. ...
'' allows using Jython and
Jacl
*
ZK – a Java Ajax framework that allows glue logic written in Jython
*
Ignition - A software development platform focused on HMI and SCADA
*
Ghidra
Ghidra (pronounced GEE-druh; ) is a free and open source reverse engineering tool developed by the National Security Agency (NSA) of the United States. The binaries were released at RSA Conference in March 2019; the sources were published one ...
- a
reverse engineering
Reverse engineering (also known as backwards engineering or back engineering) is a process or method through which one attempts to understand through deductive reasoning how a previously made device, process, system, or piece of software accompl ...
tool developed by the
NSA allows plugins to be written in
Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
or Jython
*
openHAB - home automation software
See also
*
List of JVM languages
This list of JVM languages comprises notable computer programming languages that are used to produce computer software that runs on the Java virtual machine (JVM). Some of these languages are interpreted by a Java program, and some are compiled ...
*
IronPython
IronPython is an implementation of the Python programming language targeting the .NET and Mono frameworks. The project is currently maintained by a group of volunteers at GitHub. It is free and open-source software, and can be implemented with P ...
– an implementation of Python for .NET and Mono
*
PyPy – a self-hosting interpreter for the Python programming language.
*
JRuby – similar project for the Ruby programming language.
*
GraalVM - a polyglot runtime written in Java, has a Python 3 implementation
References
External links
*
{{Authority control
JVM programming languages
Object-oriented programming languages
Python (programming language) implementations
Scripting languages
Software using the Python Software Foundation License