How to change Java properties at runtime?

前端 未结 5 1620
温柔的废话
温柔的废话 2021-02-07 08:33

The question: Is there some way to \"connect\" to a running JVM and change system properties (given by -Dproperty=value) without stopping the JVM and without having programmed a

5条回答
  •  粉色の甜心
    2021-02-07 09:03

    you can do it using System.setProperty() method. for example: System.setProperty(key, value);

提交回复
热议问题