My goal is to attach a Java profiler or debugger to an instance of the Java Virtual Machine started by a Windows application called Nuix.
It is possible to pass command line switches to Nuix, some of which it passes to the JVM.
Nuix is packaged with JRE 8 in one of its subdirectories: \Nuix 7.4\jre\
. It appears that the particular version is Java HotSpot(TM) 64-Bit Server VM 1.8.0_92.
I launched Nuix with these switches:
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=80
I then tried running jconsole.exe
without command line switches, and it did not recognize the JVM started by Nuix. I tried creating a remote connection using jdb.exe -attach <Port>
, but the application failed with this exception.
java.io.IOException: shmemBase_attach failed: The system cannot find the file specified
I verified that nothing else is listening on port 80 and it is not blocked.
What the proper way to attach a debugger?
As a side question, how is it possible for a Windows .exe to use JARs? I have not seen this architecture before, and I do not believe IKVM.NET is used, and J# is not used because the application is unmanaged, according to Process Explorer.