|
Rob; I had this same problem, Barbra Morris provided the answer. Look for "RPG Calling Java, Array parameter passing" in the archives. It comes down to this: if you are on V5R3M0 you can use the %SubAry bif, if not you will probably have to use the JNI methods to interface with the Java. Duane -----Original Message----- From: Rob Glasener [mailto:rglasener@xxxxxxxxxxxxxxxx] Sent: Monday, November 22, 2004 4:50 PM To: rpg400-l@xxxxxxxxxxxx Subject: call java from RPG Hi! - I am getting an error when calling a java program from RPG The Java Virtual Machine has ended. Function check. MCH74A5 unmonitored by QJVAJNI at statement 0000002959 instruction X'0000'. Pointer not set for location referenced. Internal failure in compiler or subroutine. Application error. RNX9998 unmonitored by SENDEMAIL at statement *N, instruction X'0000'. Code looks like this: main PR EXTPROC(*JAVA : 'com.tsi.email.SimpleSendEmail' : 'main') STATIC O class(*JAVA:'java.lang.String') CONST Dim(4) Options(*varSize) newString PR O EXTPROC(*JAVA: 'java.lang.String': *CONSTRUCTOR) 100A CONST VARYING args S like(newstring) Dim(4) /free args(1) = newString('robglasener@xxxxxxxxxxxxx'); args(2) = newString('rglasener@xxxxxxxxxxxxxxxx'); args(3) = newString('Important Message from AS/400'); args(4) = newString('Here is a sample message from the AS/400'); main(args); return; *INLR = *ON; /end-free I am thinking that it has something to do the way I have the args array setup. Any help would be greatly appreciated. Thanks -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. NOTICE: This electronic mail transmission may contain confidential information and is intended only for the person(s) named. Any use, copying or disclosure by any other person is strictly prohibited. If you have received this transmission in error, please notify the sender via e-mail.
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.