Skip to content
Search

Jython

lastmod 2018-08-17created 2015-03-122 edits

Jython is a Java implementation of Python, first created by Jim Hugunin. It was originally named JPython, following the name of the standard Python implementation (CPython). Because Jython is written entirely in the Java language, it runs on any Java virtual machine.

Jython programs can import any Java class directly. Apart from a few standard modules, Jython programs use Java classes instead of Python modules. Jython includes almost all modules of the standard Python distribution, but not some modules originally implemented in C. For example, in Jython a graphical user interface must be written with Swing or AWT instead of ~TKinter.

Java and Python implementations

  • Jython: A complete reimplementation of CPython in Java. Lets you use Java classes with Python syntax.
  • JEP (Java Embedded Python): Lets you run Python scripts from Java. Java calls CPython via JNI.
  • JPype: Python launches a JVM so that Java classes can be used.

Favorite site

References


  1. Jythonbook_ko.readthedocs.org.zip ↩