How to change Java properties at runtime?

前端 未结 5 1538
温柔的废话
温柔的废话 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 08:59

    Many system properties are only examined on start up so changing them doesn't always help.

    I suggest you add support within your application to perform the change via a request so your application will know that it has happened and handle it accordingly.

提交回复
热议问题