Skillversitas

Jython in Eclipse

Eclipse supports Jython development through the PyDev plugin (which adds Jython interpreter support) and, historically, a dedicated Jython plugin. The setup gives you Jython syntax highlighting, debugging, and project tools inside the IDE - the standard way Jython projects were developed in the Java ecosystem.

Install the Plugin

  1. Help -> Eclipse Marketplace.
  2. Search for PyDev (or the Jython plugin in older Eclipse releases) and install.
  3. Restart Eclipse when prompted.

Configure the Jython Interpreter

  1. Window -> Preferences -> PyDev -> Interpreters -> Python Interpreter.
  2. Add an interpreter: point it at your Jython installation's jython executable.
  3. Verify the Python version shows 2.7.x (Jython's Python level) and that the JDK is detected.

What You Get

  • Jython-aware syntax highlighting and code completion for Python plus imported java.* classes.
  • Debugging: breakpoints, step through, inspect variables - against a running Jython process.
  • Project integration: run configurations that launch jython on your project.
  • Java interop hints: when you import java.util, the IDE can resolve the jar from your project's build path.

A Run Configuration

  1. Run -> Run Configurations -> PyDev -> Jython (or Python).
  2. Set the script to your .py file, the interpreter to Jython, and the working directory.
  3. Add classpath entries for any jars your script imports.
  4. Apply and run/debug.

Tips

  • Keep the Jython interpreter and the project's jar list consistent; a missing jar shows as a red import in the editor.
  • For large projects, organize jars into libraries in the project build path so multiple scripts share them.
  • PyDev works for CPython too, so the same IDE can host both Python and Jython projects.

Summary

Develop Jython in Eclipse by installing the PyDev plugin (or the classic Jython plugin), registering your Jython interpreter under PyDev interpreter preferences, and adding your jars to the project build path. You then get Jython syntax support, java.* resolution, and a debugger for Jython run configurations.