Summary
The following non-standard java
launcher options will be deprecated now and removed in a future release:
-verbosegc
-noclassgc
-verify
-verifyremote
-ss
-ms
-mx
Also, the check for and conversion of -oss
option will be removed from the launcher code.
Problem
The java
launcher has accumulated several outdated, non-standard and undocumented options which it converts to HotSpot JVM specific options before passing control to the JVM.
Specifically, the launcher currently does the following conversions before passing those options to the JVM:
-verbosegc converted to -verbose:gc
-noclassgc converted to -Xnoclassgc
-verify converted to -Xverify:all
-verifyremote converted to -Xverify:remote
-ss converted to -Xss
-ms converted to -Xms
-mx converted to -Xmx
Additionally, in the case of -oss
option, the launcher converts it to -Xoss
and passes it to the JVM. The HotSpot JVM dropped support for the -Xoss
option in Java 10 https://bugs.openjdk.org/browse/JDK-8179018 and using java -oss
currently throws an error when launching java
:
java -oss Foo
Unrecognized option: -Xoss
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Solution
Except for -oss
option, the usage of the rest of the options listed above will now print a deprecation warning of the form:
java -verify Foo
Warning: -verify option is deprecated and may be removed in a future release.
...
(similar warning for rest of the options).
For -oss
option, the launcher will no longer do any specific checks or conversion and this option will be treated just like any other unknown option to the launcher and will result in an error message when launching java
:
java -oss Foo
Unrecognized option: -oss
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Specification
None.
- csr of
-
JDK-8286851 Deprecate for removal several of the undocumented java launcher options
-
- Resolved
-