Source Examples
All sample applications are part of the com.jobjects.jst.test package.
To run provided code you will need to add samples directory to your CLASSPATH
environment variable.
Windows Registry access
RegistryTest
is a simple Java application that demonstrates usage of the RegistryManager
interface. Providing different command line parameters you can create registry
keys, enumerate subkeys and set or delete registry key values.
Java application as NT Service
InstallServiceTest
shows how to install Java application as NT service. There is an appropriate
example for service removal too (DeleteServiceTest).
Note: To install or remove system service on NT you may need administrative
priviledges.
TestService
is a small Java service that handles all signals received from the Service
Control Manager. This service does nothing except that it logs a message in
the service-log.txt file every 15 seconds. This file will appear in
you current directory or in a directory specified in by InstallServiceTest.java.
If this directory requires certain user access permissions you will have to
specify username and password for the service (check InstallServiceTest.java
for details).
Note that after it has been installed by the InstallServiceTest application,
test service won't start automatically. To start or stop the service use Services
applet from the Control Panel (TestService will should appear as "JObjects
JST - Service example"). The information about received signal will be
logged in the service-log.txt.
|