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



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
<eftimios@xxxxxxxxxxx>wrote:



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
list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.