OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release
Asked Answered
A

3

22

I'm starting a new Spring 5 project with Java 14. It compiled, but gave me a warning:

OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release

Any ideas how to solve it?

Agglomerate answered 14/4, 2020 at 15:42 Comment(2)
for further relevant details JDK-8214719 might be usefulGuerdon
@123 "You are in a hot air balloon." If the OP had known that he somehow explicitly used the two JVM arguments, he would not have asked. Your comment has a zero value.Holm
C
38

It's just a warning because JVM's verifies are much faster then before. If you are really not willing to see that, you could just remove -Xverify:none and -noverify from your JVM options.

In IDEA you can do that like this: In "edit configuration", select your application, and uncheck "Enable launch optimization" in the right panel. Then start your application, the warning will be disappeared but launch optimization is disabled.

enter image description here

Crowbar answered 11/6, 2020 at 1:32 Comment(2)
IDE GUI is changed, see here.Penthea
There is actually a valid reason for this option. If you add it, classes that are referenced in functions are only loaded when the function is called. Without this option, all functions of a class are verified when the first function is called. Also autogenerated classes are expensive to create when you have to calculated the internal values like max stack depth right, and cannot just offload it to the internal JDK functions. So removing this is not an option.Garrulous
N
5

For anyone else who comes here looking for how to silence this warning in Leiningen (Clojure), export LEIN_JVM_OPTS="-XX:TieredStopAtLevel=1" was recommended by Leinigen's maintainer and worked for me.

Setting this option means that only the C1 compiler is used. To learn more about the C1 and C2 compilers, see Working with the JIT Compiler and What exactly does -XX:-TieredCompilation do?

None answered 25/5, 2021 at 21:17 Comment(1)
This is just stupid, because you loose a lot of performance using this switch.Garrulous
K
4

In the Eclipse world this can also be controlled in two places:

  • either disable the Fast startup option in the Run/Debug configuration

    enter image description here

  • or remove the corresponding deprecated argument (-noverify) from the Spring Boot Fast Startup Java argument list:

    enter image description here

Karlotte answered 29/7, 2020 at 15:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.