Information about _JAVA_OPTIONS

后端 未结 2 603
有刺的猬
有刺的猬 2020-11-28 11:27

Can anyone explain what does Java do when _JAVA_OPTIONS Environment variable defined & when application launched on the windows machine?

2条回答
  •  醉梦人生
    2020-11-28 12:33

    You can use _JAVA_OPTIONS to pass options to any JVM process started on your system.

    For example,

    set _JAVA_OPTIONS=-Dsun.java2d.noddraw=true
    

    When a JVM starts, it parses the value of _JAVA_OPTIONS as if the parameters were at the command line of java. You can see the passed parameters via JVisualVM.

    For more information, read the blog post: What I discovered while trying to pass Default JVM Parameters

提交回复
热议问题