You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On JDK 21, this produces the following warning on every debugger launch:
OpenJDK 64-Bit Server VM warning: The java.compiler system property
is obsolete and no longer supported, use -Xint
On JDK 23, the situation is worse: -Xnoagent is no longer recognized
and the debuggee fails to start outright with Unrecognized option: -Xnoagent. The standard JDI launching connector therefore does not
work on a current JDK.
For JDK 5 and later, the supported debug-agent form is:
The other options are not needed for modern debugging:
-Xdebug is a compatibility option that has been ignored on modern
JDKs and was deprecated for removal in JDK 22.
-Xnoagent has been ignored for many releases, was deprecated for
removal in JDK 22, and is rejected outright in JDK 23.
-Djava.compiler=NONE is obsolete on JDK 13+, emits the warning
above, and no longer selects interpreted-only execution. If
interpreted-only execution is desired, the supported option is -Xint.
The sibling launcher path StandardVMDebugger#runVMArguments
(org.eclipse.jdt.launching/.../StandardVMDebugger.java:196-214)
already gates the legacy options by Java version and prefers -agentlib:jdwp=... for Java 5 and later.
The PR Fix warnings during JDI tests run #511 in this repo fixed the same warning by JDK-gating the legacy emit, but only in the JDI test infrastructure
(org.eclipse.jdt.debug.jdi.tests/.../AbstractJDITest.java). SocketLaunchingConnectorImpl#launch was not updated.
-agentlib:jdwp= has been supported since JDK 5, so no version gating
is required. Alternatively, mirror StandardVMDebugger by detecting
the target JDK version and gating the
legacy emit accordingly.
Reproduction
Editor: Emacs 30.x with dap-mode + lsp-java; JDT LS server bundle org.eclipse.jdt.debug 3.25.100.v20260212-0641, jdimodel.jar from bundle org.eclipse.jdt.debug.jdi.
Target JDK tested: Eclipse Temurin 21.0.11 (reproduces the warning).
JDK 23 hard-failure mode is documented via JDK-8312072 not re-reproduced here.
Action: M-x dap-java-debug on a trivial Maven project with a public
static void main(String[]).
SocketLaunchingConnectorImpl#launchcurrently constructs the debuggee command line by unconditionally adding the legacy JPDA launch sequence:On JDK 21, this produces the following warning on every debugger launch:
On JDK 23, the situation is worse:
-Xnoagentis no longer recognizedand the debuggee fails to start outright with
Unrecognized option: -Xnoagent. The standard JDI launching connector therefore does notwork on a current JDK.
For JDK 5 and later, the supported debug-agent form is:
The other options are not needed for modern debugging:
-Xdebugis a compatibility option that has been ignored on modernJDKs and was deprecated for removal in JDK 22.
-Xnoagenthas been ignored for many releases, was deprecated forremoval in JDK 22, and is rejected outright in JDK 23.
-Djava.compiler=NONEis obsolete on JDK 13+, emits the warningabove, and no longer selects interpreted-only execution. If
interpreted-only execution is desired, the supported option is
-Xint.The sibling launcher path
StandardVMDebugger#runVMArguments(org.eclipse.jdt.launching/.../StandardVMDebugger.java:196-214)
already gates the legacy options by Java version and prefers
-agentlib:jdwp=...for Java 5 and later.The PR Fix warnings during JDI tests run #511 in this repo fixed the same warning by JDK-gating the legacy emit, but only in the JDI test infrastructure
(
org.eclipse.jdt.debug.jdi.tests/.../AbstractJDITest.java).SocketLaunchingConnectorImpl#launchwas not updated.hit the same JDK 23 breakage and patched it.
Suggested fix: replace lines 204-205 with
-agentlib:jdwp=has been supported since JDK 5, so no version gatingis required. Alternatively, mirror
StandardVMDebuggerby detectingthe target JDK version and gating the
legacy emit accordingly.
Reproduction
org.eclipse.jdt.debug 3.25.100.v20260212-0641,jdimodel.jarfrom bundleorg.eclipse.jdt.debug.jdi.JDK 23 hard-failure mode is documented via JDK-8312072 not re-reproduced here.
static void main(String[]).
Captured debuggee command line: