× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




I like Joe Sam's message queue idea. I hadn't thought of that one.

If the values to be returned are fairly static, I like to use data areas. Easy to SUBSTRING in CL. Put them in QTEMP so they're in memory. JT400(JTOpen) has all the code.

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Thorbjoern Ravn Andersen
Sent: Wednesday, March 31, 2010 12:51 PM
To: Java Programming on and around the iSeries / AS400
Subject: Invoking Java by programmatically calling a JVM to get result values

Den 31/03/10 18.29, Joe Sam Shirah skrev:
haven't really analyzed your efforts. I've maintained from day one
that one 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 years 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?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.