john
john

Reputation: 1767

IDEA not showing JavaDoc for decompiled Java class files

I don't see the documentation in my Maven project for Java dependencies that are decompiled from .class files. It does work for external Maven dependencies.

I have activated the following settings.

Settings->Importing->Automatically Download->Sources & Documentation

And also, right click pom.xml and download documentation there.

How can I make IDEA fetch documentation for these core Java files?

Refer screenshots below to see examples of both scenarios.

image with no documentation loaded

image with documentation loaded

Upvotes: 4

Views: 989

Answers (2)

Dmitry V.
Dmitry V.

Reputation: 51

As answered above you should add src.zip file to your project's Sourcepath. Note, src.zip file is not included in jdk by default. To install it try:

sudo apt-get install openjdk-XX-source

Then choose file:enter image description here

The result will be as showed below:enter image description here

Upvotes: 0

CrazyCoder
CrazyCoder

Reputation: 402433

You need to make sure the sources are attached to the JDK configuration. It should work out of the box, but it could be that your JDK installation is incomplete and is missing the sources.

src.zip must be present in the Sourcepath of the JDK configuration:

src.zip

Try reinstalling JDK from the official download page and configure it again in IntelliJ IDEA.

Upvotes: 3

Related Questions