|
"Steffan, Otto (GE Consumer Finance)" wrote: > > Hello, > > I have to agree that really the JNI solution "is not the easiest soluton" as > Michael stated in his prior mail. > > I am going to call a CallObjectMethodA JNI method and finding that the job > is much more complex than I anticipated before :-(. > Please can someone check my following lines to assure me that I am on the > right track? we have V5R2 > It looks to me like you are on the right track. Dealing with the parameters to the method is even more fun ... I know you've already said your reasons for doing it this way, but I have to repeat that a very slight modification to the Java class would make this problem go away. Since a Java array of anything is also an Object, they would just have to define another method that returns the array as a single object. Then you could use the array JNI functions on the returned array object without having to mess around with the call functions. Object[] meth2(String x, int i) // this is the real method { return whatever; } Object meth2(String x, int i) // code the same parameters as the "real" method { return meth(x, i); // call through to the real method }
As an Amazon Associate we earn from qualifying purchases.
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.