As per the link I successfully be able to connect HSDB to running jvm process on Ubuntu by following steps below:
- (On Ubuntu Terminal)
set SA_JAVA=/usr/lib/jvm/java-8-oracle/bin/java
- (On Ubuntu Terminal)
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
- (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:
- (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 findd: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
). - For a while I skipped
"windbg"
and execute the following command. Which gives the following Screen. On the above screen I entered running jvmprocess id
which I gathered from Windows Task Manager and clicked on OK button. The following screen appears and caused an exception. I know the link I followed is very old. How can I runsun.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.