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




Except that RPG doesn't allow object subfields, so the L member can't be
defined like(jobject).  An object reference is actually an integer, so
jint (or maybe better 10i 0) has to be used for that subfield.

The problem with that is that you can't assign an object to an integer or vice-versa.

For example, the following won't compile:

     D myint           s             10I 0 inz(123)
     D myobj           s               O   CLASS(*Java:'java.lang.Object')
      /free
         myobj = myint;

When you want to call an API like CallVoidMethodA() and the method you're calling accepts an object as a parameter, how do you pass the object? You can't use the jvalue array because you can't assign the object to the integer.

Granted, you could make your own copy of the CallVoidMethod() prototype and specify the exact parameters you want (this is what I've had to do) but it defeats the purpose of having an L member in the jobject structure.

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.