Generated by DeepSeek V3.2| Jython | |
|---|---|
| Name | Jython |
| Developer | Python Software Foundation, Jython Development Team |
| Released | 17 January 2001 |
| Latest release version | 2.7.3 |
| Latest release date | 31 December 2022 |
| Programming language | Python, Java |
| Operating system | Cross-platform |
| Genre | Programming language |
| License | Python Software Foundation License |
| Website | https://www.jython.org/ |
Jython. It is an implementation of the Python programming language designed to run on the Java platform. This integration allows developers to seamlessly use Java libraries and frameworks from within Python code, effectively bridging two major programming ecosystems. The project, originally known as JPython, is managed by the Python Software Foundation and a dedicated team of contributors, providing a powerful tool for scripting and application development in JVM environments.
Jython compiles Python source code directly into Java bytecode, which is then executed by the Java virtual machine. This architecture provides full interoperability with the extensive Java Class Library and enables the use of Python as a scripting language for Java Enterprise Edition applications. Unlike the standard CPython implementation, which is written in C, Jython is primarily implemented in Java, allowing it to leverage the Java platform's strengths, such as automatic memory management and robust exception handling. The project adheres to the Python Language Reference for its supported versions, ensuring a high degree of compatibility with the standard language specification.
The project was originally created in 1997 by Jim Hugunin, who named it JPython. It was later taken over by Barry Warsaw and a team at the Corporation for National Research Initiatives. In 1999, development moved to BeOpen.com, and the name was changed to Jython. Since 2000, the project has been under the stewardship of the Python Software Foundation, with key contributions from developers like Frank Wierzbicki and Oti Humbel. Major releases have tracked significant versions of CPython, such as Jython 2.5 aligning with Python 2.5, with the long-term goal of achieving compatibility with the Python 3 series. The project's history is closely tied to the evolution of both the Python Software Foundation and the broader Java community process.
A primary feature is its seamless integration with Java, allowing Python code to instantiate Java classes, inherit from them, and call methods directly. It supports most Python Standard Library modules, though some C-based extensions are not available. The interpreter provides dynamic access to JavaBeans properties and supports Java reflection for advanced introspection. Other notable features include support for just-in-time compilation via the JVM, the ability to run within any Java servlet container like Apache Tomcat, and the use of JNI for accessing native code. The implementation also includes the standard interactive interpreter for rapid prototyping.
The Jython runtime is built using Java and includes a compiler that translates Python syntax into Java bytecode. This compiler generates .class files that can be packaged into JAR files for distribution. The core interpreter manages the mapping between Python objects and Java types through a sophisticated type system. Memory is managed by the Java virtual machine's garbage collector, unlike CPython which uses reference counting. The build system traditionally utilized Apache Ant, with ongoing efforts to integrate with modern tools like Gradle. The implementation strives to maintain compatibility with specifications from the Java Community Process.
Jython is widely used for writing test scripts for Java EE applications using frameworks like JUnit. It serves as a scripting engine within IBM WebSphere and Oracle WebLogic Server for administrative tasks. In data science, it enables the use of Python libraries alongside big data platforms like Apache Spark running on the JVM. The NASA Jet Propulsion Laboratory has utilized it for scientific computing tasks that require integration with legacy Java systems. It is also employed in build automation tools, for embedding scripting capabilities in NetBeans plugins, and for creating extension modules for applications like Apache OpenOffice.
Development is coordinated through the official website and source code repositories on GitHub. The project follows the governance model of the Python Software Foundation and participates in events like PyCon US and JavaOne. Contributions are managed through a meritocracy-style process, with core developers reviewing patches submitted via the Bugzilla issue tracker. The community maintains detailed documentation and regularly publishes updates through the jython-dev mailing list. Funding and support have historically come from organizations like Google through programs like the Google Summer of Code. The roadmap focuses on achieving full Python 3 compatibility and improving performance benchmarks against other JVM languages like Scala and Kotlin.
Category:Free software programmed in Java Category:Python (programming language) implementations Category:Java programming language