VisualVM does not support this use. It is used to monitor already running Java applications.
If you need to profile application startup, you should use NetBeans Profiler isntead. NetBeans Profiler and VisualVM use the same profiling mechanism to subsequently open and analyze profiling snapshots in VisualVM.
source
share