Why should I care about the CRTJVAPGM command?

Joe Sam Shirah

When the JAVA or RUNJAVA command is invoked, if an internal MI program object does not exist, OS/400 will create one. When this occurs with individual classes, the objects will be saved, so the main penalty here is first time use. However, with zip or jar files, while the same creation process is followed, the resulting objects are not saved, so the penalty is incurred on each run.

By using the CRTJVAPGM command beforehand, any possible runtime penalty is avoided. You can use the DSPJVAPGM command to find out whether the MI object exists.