× 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.



Joe,

You are right that JNI integration wrt RPG is rather nice.
However, this is not what i meant with "not integrated", read my previous
note.

I have one problem with RPG and Java integration however, a bit off-topic,
but anyway. An alphanumeric field in RPG seems to be always translated to a
byte-array, instead of a String. Then, RPG to Java support always assumes
the field contains text, and thus always translates the contents to UTF-16.
This is not correct. When just want to pass a field with bytes i can't do
that, because it gets translated. The other way around would be better,
never translate it automatically, and when it contains text i can (manually
by invoking a routine) translate ebcdic to utf-16 and pass that. This is one
example of integration, which is ok, but still causing headaches because of
the "different" (i.e. ecbdic etc) nature of it. This always translating
alpha fields to byte-arrays (not Strings but byte-arrays) is not correct. It
seems like it wasn't well thought out.

Developing on the AS/400 and integrating with the rest of the world always
seems problematic. With or without first-class support for JNI (which RPG
has and is rather unique but.... doesn't work without hassles, again!)







On Mon, Jul 11, 2011 at 2:26 PM, Joe Pluta <joepluta@xxxxxxxxxxxxxxxxx>wrote:

As I noted in my post, many languages have JNI support, and Perl is no
exception. JNI is Java Native Interface, and typically it is
implemented via a support library that lets you start a JVM, find a
class, get a pointer to a method in a class, craft an array of
parameters, and then invoke the function. You can find a "simple" Hello
world here:

http://www.devdaily.com/scw/perl/perl-5.8.5/jpl/JNI/JNI.pm.shtml

Contrast this with RPG's ability to directly prototype a Java method
using standard D-specs and then invoke that method just like you would
any other language. There's really no comparison in ease of use.

> "this thread ain't fooling nobody"

Not quite sure what that means, Evan, but I'm trying not to fool anyone!
:)

Joe

I've never had the need to make it work but perl has some modules that
apparently allow the use of java from within perl code.

RPG may not be dead but this thread ain't fooling nobody....

On Mon, Jul 11, 2011 at 3:29 PM, Joe Pluta<joepluta@xxxxxxxxxxxxxxxxx>
wrote:
I'm not sure how much time I should spend debating with someone who
comes onto a list about RPG programming on IBM i and proceeds to bash
the platform and say that RPG isn't even a language. Clearly you don't
like the topic of this list, so what do you hope to achieve with your
posts? More to the point, though, is that I don't understand your
comments. Like this one:

Java isn't well integrated (not at all actually).
What is this supposed to mean? On what other platform is Java better
"integrated" and why? Certainly not Microsoft. Heck, prior to RPG I
didn't even know another language that could directly call Java. I mean
you can usually use JNI, but only RPG has direct support for prototyping
functions and methods and invoking them. But in any case, saying Java
isn't well integrated on the IBM i is pretty much the opposite of
reality as far as I can tell.

Please, let's start with this one simple statement and then maybe we can
move on to some of the others.

Joe
--



--
This is the RPG programming on the IBM i / System i (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.



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.