com.ms.service Package Overview
Microsoft Packages Overview
The com.ms.service package enables you to write a Microsoft® Windows NT® system service in Java. (System services do not work under Microsoft® Windows® 98.) For more information about Windows NT system services, refer to the MSDN Library.
This package contains the following:
Classes
Hierarchy
To create and use a Windows NT service using this package, you must perform the following steps:
- Create your own service class by deriving it from the Service class.
- Implement either a default constructor with no parameters or a constructor with a single String[] parameter. This constructor will be used to instantiate the service, and it should perform initialization during ServiceMain.
- Implement your own versions of service callback methods (the methods that start with handle) to handle the various system service requests.
- Use the query methods (the methods that begin with can) to determine which controls are accepted by a service (instead of testing the flags returned from getControlsAccepted).
- Use a built-in assassin to terminate a service that exceeds a time-out period specified by the wait hint value in status updates.
- Use the jntsvc tool to generate a self-contained, self-installing and uninstalling, redistributable executable for the service.
- After generating the executable, install and run the service.
For instructions on generating a service executable using the jntsvc tool, and on installing, uninstalling, and running the executable, see the jntsvc section of the Tools Reference.
© 1999 Microsoft Corporation. All rights reserved. Terms of use.