How can I create a Java program that starts as a daemon every time the machine is powered on?
Created May 4, 2012
Rob Derr Several methods come to mind. Let's see...
1. write a CL program that calls your java app and place a reference to that CL command in QSYS/QSTRUP. This java app should begin a new thread, then end to allow the QSTRUP job to continue. ie:
PGM JAVA CLASS(myClass) PARM(myArg1) CLASSPATH('myclasspath') ENDPGM
2. Use ADDAJE to add an autostart job entry (warning: this involves altering subsystem QSYS.)
3. use ADDJOBSCDE to schedule the program to run after IPL.
The first method is probably the best while the third is the easiest.