|
First, I think you'll find the defaults have changed for .jar and .zip files. At some point, we decided to save the compiled programs for these (I forget what release we changed this, but I think by V4R4, it is the default). In V4R5, the default will change again to JIT, so the program will not be added if it doesn't exist in V4R5. But, you said you were on V4R4, so unless you were careful in how you invoked Java, you'll probably find you have one, probably at OPTIMIZE(20). Opt(20) was chosen so that the implicit compile did not take too long. Do DSPJVAPGM '/yourdirectory/yourjar.jar' and see if there's a Java program attached to your Jar or Zip file after all. The JAVA command prior to V4R5 will do implicit CRTJVAPGMs unless told to interpret, something I presume eveyrone knows, but I left out of my last (long) posting. Second, it really isn't practical to intermix the CRTJVAPGM Transformer code and JIT code in the sense of saving the JIT code. I've glossed over a few differences that Blair mentioned. While the JIT versus OPT(40) works out as I said in practice, there are actually optimizations that OPTIMIZE(40) does that even "Hot Spot" or the IBM JIT process does not do and there are also a few things the JIT can do that the OPTIMIZE(40) Transformer either cannot do or can only do with a little more code. Thus, their outputs are not entirely equivalent. They interoperate, but the very fact the code is saved, or not, can affect some of the code generated. The Transformer still comes out on top overall, so it is still a good thing to do in most cases. But, the JIT can be a trusty alternative, especially if you have some huge jar file you've imported from somewhere and you don't want to kick off a large and costly CRTJVAPGM at OPTIMIZE(40) to use what may be only a handful of classes once or twice from that jar file. I think you'll find that if there is no *PGM behind a given .class or .zip file, you'll be able to invoke JAVA to do JIT on those without a *PGM and use the trusty OPT(40) program on those that have them. This probably gives you what you want anyway. Or, you can invoke an all-JIT process as well. But, it does mean that if you want a persistent program, use the Transformer. If you want to exploit the throw-away aspect of dynamic code load, and yet get decent code, then use the JIT. Larry W. Loen - Senior Java and AS/400 Performance Analyst Dept HP4, Rochester MN +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.