I downloaded visualvm 2.0.6 (currently latest) on windows.
I tried making the following attempts:
Integrating VisualVM with Intellij IDEA.
- I installed VisualVM Launcher plugin.
- Set the VisualVM executable path
bin/visualvm.exe
- Executing Run
- VisualVM window opens up.
- My program completed execution.
- VisualVm shows this error:
can not open requested application
- Tried all solutions from this stackoverflow post.
- Executing Debug
- VisualVM window opens up.
- I can see my application inside the Application node.
- Visualvm freezes completely and I cannot click/open my application to profile it. I had to end the task from the task manager.
Commandline way
After seeing no results from above, I tried to run my application normally using the command line.
- Opened
visualvm.exe
. - Opened cmd, and executed the regular java command:
java -classpath "path/to/all/jars/dependencies/" main.Main
- Program completed execution, but visualvm didn't show anything.
Other solutions from StackOverflow posts:
All the following didn't work:
- Gave full access to folder
%temp%/hsperfdata_<username>
. [post] - Deleted
%temp%/hsperfdata_<username>
and closed all java applications, restarted VisualVM (which recreated thehsperfdata
folder), and tried again. [post] - Explicitly tried to set the
java.io.tmpdir
while running VisualVm. [post]visualvm -J-Djava.io.tmpdir=[path/to/hsperfdata_<username>]
- Tried opening Intellij & cmd as administrators and run visualvm. [post]
Is there any step/process I am missing?
If any more information is required, let me know.
Shall I try any other open-source alternative for VisualVM
?