Thanks Alan.
I read that blog post and yes im using the IntelliJ plugin.  IntelliJ version 10.5.1., plugin version 2.7.1

As i said it correctly recongnises the java packages at edit time - but fails to find them when running the scripts in either debug or run mode. Do i need specific Run/Debug settings - e.g invoke the jvm rather than the python interpreter?

On Mon, Nov 12, 2012 at 9:11 PM, Alan Kennedy <> wrote:

> Possibly some pointers as to how to configure intellIj to run python scripts utilizing java packages using jpython.  IntellIJ detects the packagaes and allows autocomplete if the SDK is set to python. However, as soon as i execute the script the java classes are not loaded. Any pointers?

It's been a long time since our language was called jpython: jython has been its name for many years.

(although it must be said that the name jpython is useful to differentiate it from "cpython", or the C-language implementation that people sometimes simply refer to as "python").

This blog post talks a little about jython support in JetBrains products (IntelliJ is their Java IDE and PyCharm is their Python IDE).

The story behind Jython support in PyCharm

They state that

On the other hand, the IntelliJ IDEA Python plugin can rely on the Java support in IntelliJ IDEA itself, and it contains all the necessary logic to support Java/Python interop. The plugin can resolve imports from Python files to Java code, perform cross-language refactorings, auto-import Java classes in Python code, etc. And as far as we know, it provides a better Jython development experience than any other IDE.

The good news is that, since that time, our Java support has become more modular, and now we have the option to include just enough of it in PyCharm to support Java/Python interop but not anything more. Therefore it’s possible that a future version of PyCharm will have the same degree of Jython support as the IntelliJ IDEA Python plugin currently has. However, we’re still not sure if there’s enough of a target audience for this functionality. So if you’d like to have this, please let us know.

What version of IntelliJ are you using?

Are you using the IntelliJ IDEA plugin? What version?