|
meovino=/SPx079MrvAgMxX8nMqP6gC/G2K4zDHf@public.gmane.org wrote: > > Barbara, > > I tried what you said, and I'm still having a couple of problems. > > 1. If I remove the STATIC keyword, the RPG program will not compile. I > have changed the way I am calling this from an EVAL to a CALLP, because > without the return value in the prototype, it won't let me do an EVAL > (which makes sense). This is how I'm calling it: > > c callp conversionTest(sFile:format) > > The prototype now looks like this: > > D conversionTest PR ExtProc(*JAVA: > D Class1:'conversionTest') > D STATIC > * method parameters > D f O Class(*JAVA:'java.io.File') > D Const > D format 10I 0 Value > Mike, you've got to read the whole "RPG and Java" section in the ILE RPG Programmer's Guide. But I'll give you a hint. With a non-static method, Java needs to know what object is being used. In Java, you would code something like this, where "myObj" is your object: myObj.conversionTest(sFile, format); RPG needs a way to tell Java what object is being used. You have to code "myObj" somewhere in that call. But RPG doesn't have the myObj.conversionTest syntax, so ...
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.