I've created a simple 1 file java application that iterates through a loop, calls some functions, allocates some memory, adds some numbers, etc. I run that application via eclipse's Run As->Java Application
.
The running application shows up in Java VisualVM under Local
.
I double click on that application and go to the Profiler tab.
The default settings are:
Start profiling from classes: my.main.package.**
Do not profile classes: java.*, javax.*,
sun.*, sunw.*, com.sun.*
I click on CPU
. The CPU
and Memory
buttons gray out. Nothing happens.
The Status
says profiling inactive
.
When my application terminates the Status
says application terminated
.
What am I doing wrong here? Are there some settings I need to tweak? Do I need to set a VM flag when I launch my application?
-J-D...
option to pointjvisualvm
at something launched from eclipse. I appreciate your insight and attempt to help, but sadly it did not work. Also note that this question has been closed. – Baggy-J
option didn't work, this can only be because you haven't pointed it to the actual java.io.tmdir (Eclipse overrides the standard location). That's the documented way to pass JVM arguments to JVisualVM. The reason it works now could easily be related to the bug I mentioned (case-sensitivty of the folder location) which 'cures itself' depending on the case of the username you log on with. Worth 15 rep? :) – Emory