question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OpenJDK 11 javadoc not returned on hover

See original GitHub issue

I am running Debian testing with OpenJDK 11. I am using Neovim v0.3.4. Lately, jdt.ls has not been returning javadoc from the OpenJDK 11 doc package in hover responses. For example, if I hover on the keyword String, I do not get the javadoc for String. Instead I get this: image I had it working with snapshot jdt-language-server-0.36.0-201903201910 and neoclide/coc-java as my client for a while and it just suddenly stopped working. The problem seemed to be that I had set JAVA_HOME for maven and I was able to get snapshot jdt-language-server-0.36.1-201904020132 to send javadoc by explicitly configuring the path to the jdk in coc’s settings (even though it was the same path as JAVA_HOME). However, jdt.ls has stopped sending the jdk javadoc again and I have not been able to get it to work again. I have tried the most recent snapshot (jdt-language-server-0.37.0-201904162228) but it does not send the jdk javadoc either. To rule out coc as the problem, I also tried using prabirshrestha/vim-lsp as my client and I still had the same problem. Here is a trace I get from coc:

[Trace - 3:45:08 PM] Sending request 'textDocument/hover - (5)'.
Params: {
    "textDocument": {
        "uri": "file:///home/user/udemy/maven/mb2g-lombok/src/main/java/guru/springframework/model/User.java"
    },
    "position": {
        "line": 12,
        "character": 14
    }
}


[Trace - 3:45:08 PM] Received response 'textDocument/hover - (5)' in 56ms.
Result: {
    "contents": {
        "language": "java",
        "value": "java.lang.String"
    }
}

The bug report I made to neoclide/coc-java concerning this issue can be found here. I have closed that issue since this seems to be a problem between jdt.ls and OpenJDK 11 on Debian and not an issue with my lsp client.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:26 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
Yanpascommented, May 13, 2019

Same issue in ubuntu. Fixes with sudo ln -fsr /usr/lib/jvm/openjdk-11/lib/src.zip /usr/lib/jvm/java-11-openjdk-amd64/src.zip. Need to install openjdk-11-source as well

0reactions
STimurcommented, Jan 17, 2020

Same issue in ubuntu. Fixes with sudo ln -fsr /usr/lib/jvm/openjdk-11/lib/src.zip /usr/lib/jvm/java-11-openjdk-amd64/src.zip. Need to install openjdk-11-source as well

don’t fully understand why it works, but this command helped me resolve same issue in IntelliJ IDEA 2019.3.1 (Ultimate Edition) on ubuntu 18.04.3 LTS - i had no documentation for Java SE 11 when pressing Ctrl-Q

Thanks a lot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Eclipse not showing javadocs on hover, but shows them on ...
I have tried adding both the jar files and the url for JavaFX 11 to the "Javadoc location" (see screenshoot) to each jar-file...
Read more >
549029 – Attached Javadoc 11 API document is not displayed
It looks like getAttachedJavadoc of org.eclipse.jdt.internal.ui.text.javadoc.JavadocContentAccess2 class is returning null. Comment 3 Kris De ...
Read more >
Ubuntu Eclipse Javadoc Does Not Show - ADocLib
Go to Preferences/Java/Compiler/Javadoc and change the following ... Lately, jdt.ls has not been returning javadoc from the OpenJDK 11 doc ...
Read more >
MotionEvent - Android Developers
Axis constant: Generic 11 axis of a motion event. ... contains the most recent point, as well as any intermediate points since the...
Read more >
Java Doc comments (Beginning Java forum at Coderanch)
Eclipse and IntelliJ (and Netbeans?) have the ability to display Javadocs when you hover over a usage of a method. That is, you're...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found