4

The following message appears when I run any program.

Picked up _JAVA_OPTIONS: -Xverify:none
Java HotSpot(TM) 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.

A lot of related questions pointed to Editing Custom VM Options, but that did not apply to me.

I eventually discovered that Java runtime is finding this setting in my Environment Variables, which has variable _JAVA_OPTIONS as -Xverify:none.

I am almost certain that I would not have added this variable, so is there any other way it could have been created in Environment Variables? Is it safe to delete from Environment Variables without consequence?

Suede
  • 416
  • 2
  • 5
  • 16

1 Answers1

3

If you don't need to run any application that requires disabled startup verification (which is not recommended because the verification protects users from malicious code), it should be safe to delete it.

The -Xverify and -noverfiy options were deprecated and seem to be removed in a future version to protect users from running malicious code (as described in the release notes: https://www.oracle.com/technetwork/java/javase/13all-relnotes-5461743.html and on the linked page in their bug tracking system https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8214719). In these release notes they mention AppCDS as an alternative for users who need to run code without startup verification.

LarsenR
  • 106
  • 1
  • 3
  • 1
    Why would this appear in my Environment Variables? If I didn't add it – Suede Feb 06 '20 at 21:31
  • 1
    Most of the time, installers manipulate the environment variables to make certain functions work. But the _JAVA_OPTIONS should normally not be edited by external programs, because they can influence the start options of every JavaVirtualMachine. – LarsenR Feb 06 '20 at 22:01
  • Thank you. I deleted the Environment Variable and I no longer receive the error message. So, this might have been something I accidentally created at one point or another? When would it be advantageous to disable startup verification? – Suede Feb 06 '20 at 22:46
  • 3
    @Suede If you are using Intellij Idea to run Spring Boot, check your run configurations. Enabling `Enable launch optimization` will add `-XX:TieredStopAtLevel=1` and `-noverify`. It is documented [here](https://www.jetbrains.com/help/idea/run-debug-configuration-spring-boot.html#configuration-tab) – boombar Nov 17 '20 at 09:30