Getting the parameters of a running JVM

前端 未结 12 605
栀梦
栀梦 2020-12-04 05:43

Is there a way to get the parameters of a running JVM? Is there a command line tool like jstat which takes as input the pid of the JVM and returns its starting parameters? I

12条回答
  •  -上瘾入骨i
    2020-12-04 06:21

    This technique applies for any java application running local or remote.

    1. Start your java application.
    2. Run JVisualVM found in you JDK (such as C:\Program Files\Java\jdk1.8.0_05\bin\jvisualvm.exe).
    3. When this useful tool starts look at the list of running java application under the "Local" tree node.
    4. Double click [your application] (pid [n]).
    5. On the right side there will be inspection contents in tab for the application. In the middle of the Overview tab you will see the JVM arguments for the application.

    jvisualvm can be found in any JDK since JDK 6 Update 7. Video tutorial on jvisualvm is here.

提交回复
热议问题