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.
By default, IntelliJ IDEA shows all classes, methods, and other elements of the current file. To toggle the elements you want to show, click the corresponding buttons on the Structure tool window toolbar. to show class fields. to have protected class members shown in the tree.
IntelliJ IDEA suggests to import single classes by default. You can change the settings to import entire packages instead. In the Settings/Preferences dialog ( Ctrl+Alt+S ), select Editor | Code Style | Java | Imports. Clear the Use single class import checkbox, and apply the changes.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With