Skip to content
Discussion options

You must be logged in to vote

Hi @ardikars,

neotest-java does not use JAVA_HOME directly. Instead, it resolves the java/javap binaries by querying JDTLS (the Java language server) at runtime via the java.project.getSettings LSP command, specifically reading the org.eclipse.jdt.ls.core.vm.location setting.

So the binary path it uses is whatever JDK JDTLS has configured for your project, not your shell's JAVA_HOME.

The path in your error (/usr/lib/jvm/java-21-openjdk/bin/javap) looks like it was reported correctly by JDTLS — the issue is that the binary doesn't exist at that path on your system. A few things to check:

  1. Is the JDK actually installed at that path? Run ls /usr/lib/jvm/java-21-openjdk/bin/javap to verify. …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ardikars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #269 on March 31, 2026 17:02.