Windows Management Instrumentation (WMI) from Java
This post shows how to instrument Windows resources using WMI and Java. The attached source code has 3 programs:
PrintInstances.javaprints all instances of a given class. For e.g., to retrieve a list of services useWin32_Servicein WML.SimpleServiceManager.javastarts or stops a given service.ServiceManager.javastarts or stops a service by starting/stopping any dependents.