|
Barbara Morris wrote: > > * Class: java.net.URL > * Method: String getHost() > D getHost PR 100 > ExtProc(*JAVA:'java.net.URL':'getHost') > Oops, I didn't code this correctly. Since it returns a String, it has to be prototyped with a String return value. Otherwise, it will get a method-not-found error. D getHost PR O Class(*JAVA : 'java.lang.String') D ExtProc(*JAVA:'java.net.URL':'getHost') To call it, you need an object. (A variable of RPG type O). You also need to declare a String for the result. Then you can use getBytes on the String to get the result value. D url S O Class(*JAVA:'java.net.URL') D string S O Class(*JAVA:'java.lang.String') D stringVal S 65535A Varying url = ... call your constructor string = getHost (url); // get the value from the string, // and then free the string stringVal = getBytes (string); freeLocalRef (string);
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.