hi is there a proper Java win32 library, for example, displaying current processes, finding out port numbers a process has taken etc etc. ? (or something like a WMI library ?) thanks
hi is there a proper Java win32 library, for example, displaying current processes, finding out port numbers a process has taken etc etc. ? (or something like a WMI library ?) thanks
Have a look at JNA. It's a 100% pure java way to communicate with native code.
They have a secondary lib named Platform.jar which packages some of the most common native API.
Althought I know what it is, I haven't used platform so I can't point out where you'll find what you're looking for. But from my global JNA experience this should help A LOT !!!
(end of answer)
For those who wonder how it works (it's explained on their homepage) ... well let's say they've handle the native part for you so that you can focus on the java end. The main librairy (jna.jar) bundles many native libs (.dll, .so, .dylib) for the major os / architectures and the java end to manipulate them (which explains the size of the jar : ~ 1 Mo).
when you want to use a multi OS lib name "A.dll", "A.so" or "libA.dylib" which contains the following :
Just write the following and JNA will do the rest :
and use it :
Which means that if Platform.jar does not suit your needs it should be easy for you to write a wrapper around the native lib that you want