How can I create a Java program that starts as a daemon every time the machine is powered on?

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.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact