No JDK Javadocs IntelliJ 2018.1 macOS 10.13.4
I've realized over the past few days that I am no longer able to see Javadoc documentation for the regular JDK. There are no sources attached and now every time when I want to see the details of a Java class (e.g. java.lang.Double) it is decompiling the class because there are no sources available.

In the screenshot above you can see that there's absolutely no documentation available for the currentTimeMillis() method.
I've recently updated to IntelliJ 2018.1, however, I don't believe that's the issue since I can seem to remember it being fine after that update. I have also updated my OS recently to macOS 10.13.4, but I don't know if that is relevant. I've looked all around for the 'missing JDK sources/documentation', but I can't seem to find anything on it.
Note that my JDK has not been updated recently. IntelliJ says the version it's using is 1.8.0_144 although my system (via the Java Control Panel) says 1.8.0_161. It has been like that for a while; macOS doesn't like to update the version in the command line and such for some reason.
If anyone could help me out with this I'd appreciate it. I very much would like to be able to see the sources for Java.
Please sign in to leave a comment.
Please try following this advice: https://stackoverflow.com/a/8589892/8958060
After looking into this, yes the documentation link above will solve the problem of retrieving documentation, however, it is only a temporary fix that doesn't solve the problem of the missing JDK source code.
If I navigate to where the source code is attached to the SDKs in File > Project Structure > SDKs and go to the Sourcepath tab, you can see below that it is attached properly.
I have found another thread that is also trying to solve this here, however, it doesn't have a solution that I can see either in the thread or the linked StackOverflow thread.
Is there anyone that can assist with this still? I appreciate any further help.
I just found a (kind of) fix. I don't really like it, but it's the only way I've found. If I navigate to the source files above and open them then re-compress them into a new ZIP file and replace the paths above to the paths with the new ZIP files they start working again. I'm not sure if the ZIP files were somehow corrupted or changed and how that would even fix it.
If anyone has a better way I'd appreciate if you could let me know. Thanks
Hi, it sounds like a JDK problem, does it helps if you install latest version of JDK, and add it via Project Structure | SDK
Hi,
Sorry I didn't see this comment. I do have the latest version of Java 8 installed as the Java Panel says that it is version 161 (at the moment I don't want to go through the trouble of reinstalling Java). I noticed something else also; it is only the path that inhibits the sources from being read. Right now I have the paths in my Downloads folder on mac, however, if I put them back in the default JDK path (/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home) it no longer works or recognizes that I have sources attached. I assume this has something to do with IntelliJ recognizing the default JDK home folder and treating the sources differently. Maybe an issue with 2018.1? I'm not sure.
Are you sure that there are no problems with permissions? If the problem would persist please raise a ticket at: https://youtrack.jetbrains.com/issues
I'm not 100% certain there's not a problem with permissions, however, this did only show up recently without me doing anything to the permissions on the JDK home folder. Also, the Java dependency library jars work fine. Are there steps I can take that would allow me to check if it is a permission issue? Any help is appreciated.
Mark,
Do you face the same issue with new sample project?
I created a new basic Java project without any templates and removed the SDK sources I had added to it in my Downloads folder (confirming that the documentation was there before I removed them) and leaving the default SDK source paths. Still no luck, however, the documentation vanished as soon as I made the change.
Using java.lang.Double as a reference for having documentation. Waving over it just brings up the class description with no Javadocs and going to the source will decompile the class.
Mark,
Could you please attach idea.log ("Help | Show Log in...") after restarting IDEA and opening documentation? You could use any online sharing service or our FTP: ftp://ftp.intellij.net/.uploads/
https://pastebin.com/TRWZG29V This is the log after startup.
I'm intrigued, thought, since when I started it up this morning I removed the default packages as well as my extra ones for sources and added them back and now it is working properly. Something of note is that the icon for the sources package changed from the first to the second image below.
The second image is also what the sources look like if I add them from another location other than the default JDK path. Now looks like it's all working again. The log I've posted is the log of me removing it and adding them back as well as opening a couple other projects.
Mark,
According to log custom plugins might cause the problem. Please try to temporary disable them:
```
Loaded custom plugins: .ignore (2.6.1), BashSupport (1.6.13.181), CSV Plugin (1.6.0), Kotlin (1.2.31-release-IJ2018.1-1), Minecraft Development (2018.1-1.2.3), SnakeYAML plugin (1.17.0), Statistic (3.4.1), VisualVM Launcher (1.9.138.2210)
```
Fortunately and unfortunately, it looks like it's now working correctly since my last reply. If it happens again I will attempt to disable the plugins I have running. Thank you for your help. If anyone else has this issue maybe they will find this thread helpful.
Mark,
Thanks for getting involved!