Scope of the Java System Properties

前端 未结 7 787
灰色年华
灰色年华 2020-11-30 02:55

In Java we use System.setProperty() method to set some system properties. According to this article the use of system properties is bit tricky.

System

7条回答
  •  天涯浪人
    2020-11-30 03:36

    Their scope is the running JVM, but unless you have some esoteric class loader issues a static variable with a properties object will do the same thing, and with the opportunity to syncronize or do whatever else you need.

提交回复
热议问题