The only way I've seen Java implemented in this fashion, keeping the call
within the JAVA command, was to have the Java code write return data to
the IFS directory, and your program read that.
From: Thorbjoern Ravn Andersen <ravn@xxxxxxxxxx>
To: Java Programming on and around the iSeries / AS400
Date: 03/31/2010 01:57 PM
Subject: Invoking Java by programmatically calling a JVM to get result
Sent by: java400-l-bounces@xxxxxxxxxxxx
Den 31/03/10 18.29, Joe Sam Shirah skrev:
haven't really analyzed your efforts. I've maintained from day one that
is much better off avoiding calling Java from RPG . My "day one" is from
about 1997 - I'll leave it up to you to decide whether I now have 13
of Java experience or one year 13 times. You can check this list for
reasons to avoid JNI. I've never had a situation where it was required.
One benefit, as you've noticed, is large performance gains.
I've started a new topic because I'd like to hear your and others
opinion on how our needs might be solved.
We have a situation where we from CL invoke a Java program with
RUNJVA/JAVA and pass in parameters through properties and command line
arguments. Very nice. Works well.
The problem arising in the horizont is the need to be able to pass back
more than just the exit value to the invoking CL program. When I
researched the matter on V5R3 Classic JVM it appeared that this could
not be done through the RUNJVA/JAVA command.
Would the way to do this, be to follow IBM instructions on how to invoke
a JVM, call a given method and parse the returned value and then discard
it? I am not comfortable with following that approach and would really
prefer not to if any standard CL command could do it easily.
Have anybody worked with the JVM like this and lived to tell the tale?
Thorbjørn Ravn Andersen "...plus... Tubular Bells!"
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
As an Amazon Associate we earn from qualifying purchases.