Javadoc for JDK not working

已回答

When trying to view the javadocs on java.lang.String#substring(int, int), I don't get any. It only tells me where it looked ( https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html#substring(int,int)), and all links are valid when opened in the browser.

I found a similar thread from 2008, however I do have the correct links:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206853375-External-javadoc-not-working-in-8858?input_string=Javadoc%20for%20JDK%20not%20working

Javadoc for external libraries added via Gradle works fine. 

Versions:
- Java: Tried both JDK 16 and JDK 17, installed through apt
- OS: Ubuntu 20.04 LTS
- Kernel: 5.11.0-40-generic
- IntellIJ: 2021.2.2 #IC-212.5284.40 community edition

I've attached two images showing what the std doc looks like, and what an external library's doc looks like (Bukkit API in this case)

0

Hello,

Could you please attach screenshot from "Project Structure | SDKs - Documentation Path"?

0

Of course. These are the default settings that shipped with IntelliJ for me..

0

Could you please share idea.log ("Help | Show Log in...") after restarting IDE and reproducing the issue? I still couldn't reproduce it on my side.

0

Of course, apologies for the delay. I wasnt able to find a place to upload the file here, so I've used transfer.sh

Note that the log also includes Rust logging, this is because IntelliJ opens on the last used project :)

0

Could you please try to remove "Documentation Path"? According to log it generates wrong links, e.g. "https://docs.oracle.com/en/java/javase/16/docs/api/java/net/URL.html#openStream()"

0

Of course. Removing the path indeed removes the 404's from the log, however it does not show Javadoc for the standard library still, I assume that is because it now has no clue where to look :D

0

It works fine on my side without path. Could you please try to remove all configured SDK and add them once again? Also please try to run "File | Invalidate Caches"

0

That seems to have fixed it indeed. Thanks!

0

You are welcome!

0

请先登录再写评论。