I am passing in a IP address, a port #, a name and a debug option as four
This is the lines from the Java program to return the parm
public static String main(String args) throws Exception
String  arrResult = new String;
(Other stuff in the middle here)
arrResult = [Value read from scale];
The RPG looks like this..(I don't even know if I'm in the ballpark or not)
D JavaPGM pr STATIC
D O CLASS(*JAVA:'java.lang.String')
DString$new PR O EXTPROC(
D bytes 60A CONST VARYING
D args S O CLASS(
*setting up parameters to use in java call
C Eval args(1) = String$New('XXX.XX.XXX.XX')
C Eval args(2) = String$New('6001')
*call Java program
C Callp JavaPgm(args)
C Eval *InLR = *On
date: Thu, 27 Sep 2012 11:14:00 -0500
from: Dan Kimmel < <mailto:dkimmel@xxxxxxxxxxxxxxx> dkimmel@xxxxxxxxxxxxxxx>
subject: RE: Newbie to RPG calling Java....what's a good reference to
The archives of this list and the archives of the RPG list also on
midrange.com are a good place to start.
What types are you passing as parameters and what type are you expecting to
be returned? What versions of RPG, iOS and Java?
You might show us the interface of the java method you are trying to
prototype and what you have tried as a prototype and the errors you receive.
From: Steve Fekete [mailto:fekete1@xxxxxxx]
Sent: Thursday, September 27, 2012 11:23 AM
Subject: Newbie to RPG calling Java....what's a good reference to start
I am a newbie to the Java world from RPG. I have an issue where I need to
call a java program passing in parms and then getting a return value back
from the java program.
What is a good reference to learn how to do this? Trying to prototype in
RPG to receive the return value back but keep getting errors so I'm in need
of more information.
Thanks ahead of time to anyone that can help!
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2022 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
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.