One option would be don't use an array. Use a list and you can use the
java.util.Arrays.asList(array) transform the array into a list.
James R. Perkins

On Fri, Feb 11, 2011 at 01:33, eftimios pantzopoulos

I've been investigating the way that JNI works and I've been writing Java
code and then trying to get the same thing working from RPG.

The play code involves the String split method and the arrayname.length
property. This all works in the Java version.

I mistakenly thought that length was an instance variable and wasted a lot
of time until a real Java developer pointed out that it was a property of
the Java array. The array is a native Java type so of course there is no
instance variable. I've been using Tom Snyder's book (Advanced Integrated
RPG) as my bible and was using the example code to obtain the Class Id anf
Field Id for length. The field id access was failing because (as I now
understand) there is no length instance variable.

So the question is - am I able to access the property value through JNI and
if so how.

Thanks in Advance

This is the Java Programming on and around the IBM i (JAVA400-L) mailing
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.

This thread ...


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

This mailing list archive is Copyright 1997-2021 by 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.