I have a Java application, and I'd like to monitor it using Java VisualVM (`jvisualvm`).

However, in the VisualVM window very little data can be seen. Also, I can't take a heap dump.

Here is a screenshot of what it looks like, with another test app I wrote:

![screenshot](https://i.stack.imgur.com/P0Lx9.png)

I can monitor memory usage, classes loaded and threads. Heap dumps, performing GC as well as sampling is disabled.

I have tried adding `-Dcom.sun.management.jxmremote` to VM arguments, as described [here](https://stackoverflow.com/a/19951053/1938435). This is showing up in the Installation Details window. However, it does not appear in the Java process arguments. (should it?)

![screenshots](https://i.stack.imgur.com/Y6KRe.png)

I also tried to click the button in my test app until an `OutOfMemoryError` occurred. No heap dump; that is not weird as Heap Dump on OOME is disabled.

What could I do to solve this?