|
Mike Silvers wrote: > > I have run into an interesting issue with a direct call to Java from an RPG > program. After doing multiple calls within the same job, I ran into a > StringIndexOutOfBoundsException during one of the calls. > ... Mike, are you ending the JVM between calls? Even if you're not explicitly ending the JVM, if you are on V5R1, ending any activation group will cause the JVM to end. It's not really supported to end the JVM and start it again, so subsequent calls may or may not work well. (In V5R2, ending an activation-group doesn't cause the JVM to end, and it's not supported to explicitly destroy the JVM.) Aside from ending the JVM, there are other ways to misuse Java. Are you freeing your Java resources? If you end your RPG program with LR on, and you don't free all your Java objects, eventually you will run into memory problems. If you've only read the V5R1 ILE RPG Programmer's Guide section on calling Java, read the V5R2 version too - there's a bit more information on ways that Java objects can be lost through incorrect programming.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.