ServiceInstaller 1.1 Example Files ------------- Test.java (Sample application that reads/writes a text file) Test.class (Bytecode for Test.java) test.in (Sample input data) Java Example ------------ Unpack the example zip into C:\javatest. (If you unpack to a different directory, then you will have to modify the examples below accordingly.) The main Java class is Test.class. A support file is also provided, test.in, which provides some trivial data for the main class to read and write to a new file, test.out. Run ServiceInstaller to create a new service. (In this example, it is assumed that java is installed at c:\jdk1.2) Service Name : JavaTest Display Name : JavaTest Startup : Manual Dependencies : (Leave blank) Executable : c:\jdk1.2\bin\java.exe Arguments : -cp c:\javatest Test Working Directory : c:\javatest After installing, open the Control Panel's Services applet, select and start the JavaTest service. You can stop the service once it starts. It is a very small program that performs one simple task, reading and writing a short text file, and then ends. Check the c:\javatest folder for a new file, test.out, which contains the same lines of data as the file test.in. Note that if a working directory was not specified, the app would expect to find test.in in Winnt\system32, and if found, would write test.out to the same Winnt\system32 folder. Using ServiceInstaller, re-enter the name JavaTest and click the Remove button to de-install the example service. --------------------------------- ServiceInstaller Copyright (C) 2000 by Bill Giel/KCMDG bgiel@kcmultimedia.com