In VSCode, whenever I hover my mouse over a method of a Class from the Java “Standard Library” it doesn’t show the documentation of that method. Though, when hovering over the corresponding class, it shows Documentation.
For example, hovering above java.lang.Character.toUpperCase()
gets me this
When I now hover above java.lang.Character
it shows me some Documentation, so I guess at least something is working. Hovering over Chracter Class
Weirdly enough, whenever I restart VSCode and immediately put my mouse above a method, it shows me the Documentation. But as soon as VSCode is fully loaded, the next time I hover above the same method, it gets replaced with the above behavior. Hovering over method and it works
I’m running Ubuntu in WSL2 on Windows 11. Following Extensions are installed inside WSL:
- Debugger for Java
- Extension Pack for Java
- Gradle for Java
- IntelliCode
- IntelliCode API Usage Examples
- Language Support for Java(TM) by Red Hat
- Maven for Java
- Project Manager for Java
- Test Runner for Java
I installed OpenJDK 21, including the source and doc packages with apt-get
.
My JAVA_HOME
is set to /usr/lib/jvm/java-21-openjdk-amd64/
In my settings.json
(Remote) I added following lines:
"java.jdt.ls.java.home": "/usr/lib/jvm/java-21-openjdk-amd64",
"java.configuration.runtimes": [
{
"name": "OpenJDK-21",
"path": "/usr/lib/jvm/java-21-openjdk-amd64",
"sources": "/usr/lib/jvm/java-21-openjdk-amd64/lib/src.zip",
"javadoc": "/usr/lib/jvm/java-21-openjdk-amd64/docs/api",
"default": true
},
]
stiefel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.