title: How to attach VisualVM and start profiling immediatedly with application start?
body: <p>I can attach VisualVM to a running application, then start profiling.</p>
  
  <p>All this time while I am performing manual operations, the target application is running and statistics is loosing.</p>
  
  <p>How to begin collecting statistic exactly at the same moment application starts?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>With <code>Profile Startup</code> what is the way to set which class to run?</p>
  
  <p><img src="https://i.stack.imgur.com/7JVk5.png" alt="enter image description here"></p>
  
  <p>Very small cell for application setup says</p>
  
  <pre><code>-agentpath:D:/Apps/visualvm_138/profiler/lib/deployed/jdk16/windows-amd64/profilerinterface.dll=D:\Apps\visualvm_138\profiler\lib,5140
  </code></pre>
  
  <p>i.e. contains no clues to application location.</p>