Summary
java
command's -Xnoagent
option will be deprecated for removal.
Problem
java
command currently allows the -Xnoagent
option. The implementation currently ignores this option and provides no functionality for it. This option isn't documented (doesn't appear in help text nor in its man page).
There are applications which currently pass this option when launching java
. Most of these usages are of the form:
-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
These usages appear to be copy/pasted and are being used when launching java
with debugging enabled. The use of -Xnoagent
in recent versions of the JDK plays no role in launching java
in debug mode or any other functionality provided by java
.
Solution
java
launcher will start printing a warning message if -Xnoagent
is passed. The warning message will state that the option is deprecated and will be removed in a future release:
java -Xnoagent -version
OpenJDK 64-Bit Server VM warning: Option -Xnoagent was deprecated in JDK 22 and will likely be removed in a future release.
...
Specification
There are no specification changes.
- csr of
-
JDK-8312072 Deprecate for removal the -Xnoagent option
-
- Resolved
-