0

I have been trying various ways of getting VisualVM to see my Tomcat web application.

I have the config in Eclipse to allow it to control the Tomcat installation.

I have all my temp directories set to c:\development\temp in Eclipse, VisualVM, and Tomcat.

I have tried setting CATALINA_TMPDIR, -Djava.io.tmpdir in VM arguments of Eclipse launch configurations, and everything else I can find on the web. Only Tomcat does not create hsperfdata_USERNAME in the c:\development\temp directory. It keeps writing to c:\users\XXX\appdata\temp.

Am I missing something?

Danpoleary
  • 49
  • 2
  • 8
  • Which JDK version do you use to run VisualVM and Tomcat? You don't need to play with settings of temp directories unless you use old JDK. Does Tomcat run as Windows service? What is the exact name of the hsperfdata_ created by Tomcat? – Tomas Hurka Apr 10 '14 at 05:46
  • We needed to override the temp directory because McAfee was causing a 30-60% slowdown on all of our Java apps. We have an exception on a specific directory, and point temp to a sub-directory in it. – Danpoleary Apr 10 '14 at 13:50
  • I have found a very peculiar issue with VisualVM. If I add the -J-Djava.io.tmpdir=c:\development\temp to the visualvm.conf, it will not see the apps. but if I add it to the command line, visualVM does see the apps. In further testing, I create a bat file that had the parameter on the visualvm command, and it will not work. It has to be done directly from command line, and not through a shell script or conf file. – Danpoleary Apr 10 '14 at 13:54

1 Answers1

0

I was able to resolve by using a command prompt window to directly start visualvm:

visualvm -J-Djava.io.tmpdir=c:\development\temp

The argument will not work if added to the visualvm.conf file's "visualvm_default_options".

The argument will not work if placed in a bat file.

This is very peculiar behavior.

Danpoleary
  • 49
  • 2
  • 8