- This topic has 1 reply, 2 voices, and was last updated 15 years, 2 months ago by Brian Fernandes.
-
AuthorPosts
-
mxnmatchMemberI have a Java application (just a simple application with a main() which does a few things and then exits). I want to profile it, so I right click in the source file and click Profile As and then Java Application. This causes VisualVM 1.1.1 to launch while at the same time my application runs and then exits.
Nothing else happens. VisualVM just sits there. If I click the Applications button to open up the Applications sidebar I see a Local node under which I see “VisualVM” and “org.eclipse.equinox.launcher.Main”.
The instructions I’ve found seem to indicate that there should be another entry under Local which is the name of the main class that I wanted profiled. It’s not there.
I tried opening up “org.eclipse.equinox.launcher.Main”, but that appears to actually be profiling Eclipse itself which doesn’t help.
What am I supposed to do to profile my application?
Brian FernandesModeratormxnmatch,
First, which version of MyEclipse are you using?
What is happening is your app is probably starting and terminating before the profiler even has a chance to get a hold of it. The profiler does keep track of terminated applications which you will see under Local, however since your app exited before the profiler even started and so it’s missing it.
I have a couple of additional suggestions:
1) Invoke the profiling action a second time, but this time, leave the VisualVM window (from the last profiling attempt) open.
2) From the profile menu in the toolbar or your application’s “Profile As” menu, select “Profile Configurations…”. Then select your app under Java Applications in the tree view on the left and the Profile tab on the right.
Suggest you change the instrumentation scheme to Total and also check the “Profile underlying framework at startup” options and click the Profile button to profile your app.
Note: These settings are saved and future profiling sessions will use these settings.Hope this helps, please let us know if you require further assistance.
-
AuthorPosts