PyCharm and integrating with Java

14,003

PyCharm Java support is very limited, it cannot parse jars and understand Java imports right now.

If you want to develop with Java and Python at the same time, consider using IntelliJ IDEA Ultimate with Python plug-in.

Adding jre/lib/rt.jar to the Jython classpath will get the imports resolved and code completion available:

rt.jar

completion

Note that you will need to disable Trying to call a non-callable object inspection because of the known bug.

Share:
14,003
VirtualVoid
Author by

VirtualVoid

Java & C# developer. Also love to work with embedded devices (ARM/AVR).

Updated on July 19, 2022

Comments

  • VirtualVoid
    VirtualVoid almost 2 years

    This question is probably ridiculous, because i have very small experience with python.
    But have to work with that these days.

    Problem is that IDE cannot resolve any reference to java.* packages and to others in my own libraries.

    I did add some paths to the necessary libraries in interpeter but nothing changed.

    Does i did something wrong or do i need any third-party plugin?

    I am using PyCharm 2.5b with Jython 2.5.3 as interpreter.

  • VirtualVoid
    VirtualVoid about 12 years
    Yes, nice solution and guide. Exactly what i was looking for. Спасибо)
  • user2511309
    user2511309 about 8 years
    How can you add code completion for Jython in Pycharm 5? It doesn't seem to be possible to add settings like the above screenshots.