|
For the same years, I have found that when Java errors occur when
testing those functions ...the interactive job is virtually useless
to Java. Cannot start a new Java session, and cannot recover the old
one.
Hmmm.... that's not entirely true. If you get an error from Java in
RPG, you can typically run more Java without a problem.
However, if you do something like pass a *NULL object reference to a
Java function, you will cause the whole JVM to crash -- and _then_
you'll be in the state that you describe, where Java is useless until
you sign off or RRTJOB.
After running RRTJOB you can restart the JVM. This is mildly less
bothersome than signing off and on again. (However, this RRTJOB trick
doesn't seem to be documented anywhere -- so I wouldn't use it in a
program.)
But the best thing to do is write your RPG so that when you get an
error
from Java, the program immediately aborts, and doesn't try to use the
bad object reference that might've just been created. I realize that
it's easy to have bugs that don't follow this recommendation -- but if
you make an effort to catch all of the *NULL object references before
they get used, the "must restart the JVM" situation doesn't come up as
often.
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.