How can I access Java heap objects without a reference?

前端 未结 3 1550
你的背包
你的背包 2021-01-06 12:37

I would like to get a reference to all objects in the Java heap, even if I don\'t immediately have a reference to those objects in my active thread. I don\'t need non-refere

3条回答
  •  离开以前
    2021-01-06 13:13

    I suggest you take a heap dump and then inspect it using the Eclipse Memory Analyser.

    The views available allow you to drill down to instance level, view object properties. You can even query objects using OQL - and SQL-like query language for objects.

    The left panel in the below screenshot demonstrates inspecting field values.

    screenshot http://img181.imageshack.us/img181/4013/dominatortreegrouped.png

提交回复
热议问题