Skip to content
Advertisement

Unable to connect Serviceable Agent (sun.jvm.hotspot.HSDB) to running jvm on windows 7 (32 Bit)

As per the link I successfully be able to connect HSDB to running jvm process on Ubuntu by following steps below:

  1. (On Ubuntu Terminal) set SA_JAVA=/usr/lib/jvm/java-8-oracle/bin/java
  2. (On Ubuntu Terminal) echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
  3. (On Ubuntu Terminal) java -Dsun.jvm.hotspot.debugger.useProcDebugger=true -classpath /usr/lib/jvm/java-8-orcale/lib/sa-jdi.jar sun.jvm.hotspot.HSDB

For Windows 7 32 Bit and from the same link I tried to connect sun.jvm.hotspot.HSDB with running jvm process but I am facing following problems:

  1. (On command prompt) set PATH=C:Program FilesJavajdk1.8.0_40bin;d:windbg;%PATH% . But in the above command I am not being able to find d:windbg. For this dependency I Google a lot and also installed Microsoft Windows Debugger but after installation it has different folder hierarchy (c:WinDDK7600.16385.1).
  2. For a while I skipped "windbg" and execute the following command. Command Which gives the following Screen. Java Process ID Screen On the above screen I entered running jvm process id which I gathered from Windows Task Manager and clicked on OK button. The following screen appears and caused an exception. Processing enter image description here I know the link I followed is very old. How can I run sun.jvm.hotspot.HSDB on windows. Or is there any other tool that I should follow?

Advertisement

Answer

The problem is, that you are using java.exe from your jre insteand of your jdk to start hdsb. That’s why it’s looking for sawindbg.dll in your jrebin (where it isn’t found) instead of your jdkbin (where the dll is). You can see that in the LinkError error message.

So use:

C:Program FilesJavajdk1.8.0_40binjava.exe -cp C:Program FilesJavajdk1.8.0_40libsa-jdi.jar sun.jvm.hotspot.HSDB

Or better change your path to always use the java.exe in your jdk. Other tools also have problem with the jre one as well.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement