PyCharm 与 Java 集成
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10059722/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
PyCharm and integrating with Java
提问by VirtualVoid
This question is probably ridiculous, because i have very small experience with python.
But have to work with that these days.
这个问题可能很荒谬,因为我对 python 的经验很少。
但这些天必须处理这个问题。
Problem is that IDE cannot resolve any reference to java.*
packages and to others in my own libraries.
问题是 IDE 无法解析对java.*
包和我自己库中其他包的任何引用。
I did add some paths to the necessary libraries in interpeter but nothing changed.
我确实在 interpeter 中添加了一些必要库的路径,但没有任何改变。
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.
我使用 PyCharm 2.5b 和 Jython 2.5.3 作为解释器。
回答by CrazyCoder
PyCharm Java support is very limited, it cannot parse jars and understand Java imports right now.
PyCharm Java 支持非常有限,它现在无法解析 jar 和理解 Java 导入。
If you want to develop with Java and Python at the same time, consider using IntelliJ IDEA Ultimate with Python plug-in.
如果你想同时使用Java和Python进行开发,可以考虑使用带有Python插件的IntelliJ IDEA Ultimate。
Adding jre/lib/rt.jar
to the Jython classpath will get the imports resolved and code completion available:
添加jre/lib/rt.jar
到 Jython 类路径将解析导入并提供代码完成:
Note that you will need to disable Trying to call a non-callable objectinspection because of the known bug.
请注意,由于已知错误,您将需要禁用尝试调用不可调用对象检查。