12

I am facing following issues while running jvisualvm -

Java Related environment variables set on machine

java related environment variables

Following are PATH variable details, there is no path mentioned as C:\apps\Java8

Path=C:\ProgramData\Oracle\Java\javapath;
C:\windows\system32;
C:\windows;
C:\windows\System32\Wbem;
C:\windows\System32\WindowsPowerShell\v1.0\;
C:\windows\System32\OpenSSH\;
C:\Program Files\Microsoft\Web Platform Installer\;
C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;
C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;
C:\Program Files\Microsoft DNX\Dnvm\;
C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;
D:\apps\gradle-5.5.1-bin\bin;
D:\apps\apache-ant-1.10.5\bin;
C:\apps\Java\Java8\bin;
C:\Program Files\nodejs\;

When I am running jvisualvm.exe, I am getting following error, from the error it seems that jvisualvm is looking into some config file to locate JDK home path:

enter image description here

On this message I click "Yes" button then getting following error which says, you are running VisualVM is running from JRE -

enter image description here

Yuri
  • 4,254
  • 1
  • 29
  • 46
Ganesh C
  • 203
  • 1
  • 2
  • 10
  • I have some question about your Java setup. Is there a full JRE installation in `c:\apps\java\java8\jre`? What is in `c:\apps\java8` directory? Is there or was there JDK installed? – Tomas Hurka Jan 06 '20 at 16:47
  • C:\apps\java\java8 is JDK installation. I don't have anything in "c:\apps\java8". – Ganesh C Jan 08 '20 at 14:22
  • Ok, please start jvisualvm from WIndows command prompt with `jvisualvm.exe --trace ` and publish the content of the log file. – Tomas Hurka Jan 09 '20 at 08:14
  • Try updating jdk path in visualvm.conf in "etc" folder. – Tarun Chopra Jul 16 '21 at 13:52

2 Answers2

29

Try updating JDK path in visualvm.conf in the etc folder.

enter image description here

Yuri
  • 4,254
  • 1
  • 29
  • 46
Tarun Chopra
  • 386
  • 4
  • 11
8

As explain here and by Tarun Chopra.

You have 2 options:

  1. Launch bin/visualvm.exe at the command line with the --jdkhome parameter and your JDK location
  2. Update the visualvm_jdkhome variable in the file etc/visualvm.conf of your VisualVM directory.
Nicolas Dupouy
  • 450
  • 1
  • 7
  • 11