Reputation: 4871
I setup Spring boot project with Java 8 on IntelliJ latest version (2018.2). I was able to do download Spring documentation using Maven->Download Sources and Documentation
. But Java docs are not available in my project when I do CTRL+Click, all I see is the source code of the class. When docs loaded properly, we should be able to see documentation on top of method definition. I checked Project Structure -> SDK -> Documentation paths
and it has valid URL to Oracle docs. When I clicked on any class, all I see is source code for the class but documentation is missing. I tried to include docs from the Oracle website manually, it did not work either. I am on Ubuntu 18.04 operating system.
Upvotes: 2
Views: 2055
Reputation: 1253
What worked for me on Fedora 31
download zip from page https://jdk.java.net/java-se-ri/11 (for Java 11, for Java 13, replace with "/13" etc.)
or direct link for Java 11: https://download.java.net/openjdk/jdk11/ri/openjdk-11+28_src.zip
save in a custom location, e.g. ~/java/sources
open IntelliJ Idea's Project Structure -> SDKs -> Sourcepath point point to the zip e.g. ~/java/sources/openjdk-11+28_src.zip
now Ctrl+Q opens real javadoc in the editor
Upvotes: 0
Reputation: 4871
I figured out the issue. In my Ubuntu machine, I installed open-jdk8 and added as SDK in IntelliJ. But OpenJDK did not download sources along with JDK. I tried to download the sources manually, but I got 404 on OpenJDK sources website. So, uninstalled OpenJDK and installed Oracle JDK. Everything works now. Thanks everyone for the help
Upvotes: 0
Reputation: 83527
The docs URL setting has nothing to do with the code you see when you navigate to a class from the Java API. Rather, you can place your cursor in a class or method name and press Ctrl+Q to view the documentation in a popup window.
Upvotes: 2