Search code examples
javaprofilingvisualvm

Is it possible to start VisualVM immediately with some application?


It is said in documentation, that I should manually find my application in VisualVM window and "Open" it:

enter image description here

Can I avoid this step?

For example, to use ScenicView I can run my application with

-javaagent:ScenicView.jar

and it will start Scenic View automatically.

Can I do the same with VisualVM?


Solution

  • An option would be the Eclipse Visual VM Launcher, when you are starting you application from within the IDE:

    https://visualvm.java.net/eclipse-launcher.html

    Another option is to use the "Visual VM Startup Profiler" as explained here: https://visualvm.github.io/startupprofiler.html