问题
I added external jar file(stdlib.jar
on picture) to my project in IntelliJ(12.1.4), but when I want to use some static methods from it in created package(ChapterOne
) it can't resolve it. However it finds classes in default package without problem. How I can make it work ?
It seems that dependencies are ok.
回答1:
The libraries were configured correctly in IDEA, but the jars actually contained sources, not classes. So the solution is to unpack these sources from the jar files into the module src
directory.
来源:https://stackoverflow.com/questions/18111277/intellij-classes-from-imported-jar-not-visible-inside-packages