I am writing a java application which generate integer values at times. The java application is running on Windows machine. I don’t know if this is possible but I was wondering if I can create a Windows counter “MyCounter” for these values so that I can track
the “counter” in Windows Performances Monitor.
I am writing a java application which generate integer values at times. The java
Share
I don’t think it’s something that can be done in Java alone, but it could certainly be done using JNI. The JNI mechanism lets Java code interface with platform native code, so you’d create the counter in C++ (for example) and then invoke that C++ code from Java through JNI. JNA is a higher-lever layer on top of JNI which lets you do a lot of things on Windows without writing any native code yourself at all.