my rpg code is bombing when it calls a java method. Why is the method not
found?
Cause . . . . . :   RPG procedure DSHJAVA2 in program WLKLIB/DSHJAVA2
received
  Java exception "java.lang.NoSuchMethodError: GetSpeed" when calling
method
  "GetSpeed" with signature "()Ljava.lang.String;" in class
"HelloWorld".
I have the javap output below.  It shows a method GetSpeed() with
a signature: ()Ljava/lang/String;
I am successfully creating the object. The code bombs on the GetSpeed call.
    helloW      = helloWorld_New( 5: 45: 3 ) ;
    string      = helloWorld_GetSpeed( helloW ) ;
** --------------------- helloWorld_New ----------------------
d helloWorld_New...
d                 pr              o   extproc(*java:
d                                     'HelloWorld':
d                                     *CONSTRUCTOR)
d InCadence                     10i 0 value
d InSpeed                       10i 0 value
d InGear                        10i 0 value
** --------------------- helloWorld_GetSpeed -----------------
d helloWorld_GetSpeed...
d                 pr              o   class(*java:'java.lang.String')
d                                     extproc(*java:'HelloWorld':
d                                     'GetSpeed')
d string          s               o   class(*java:'java.lang.String')
d hellow          s               o   class(*JAVA:
d                                     'HelloWorld')
QSH CMD('javap -s HelloWorld')
Compiled from "helloworld.java"
class HelloWorld extends java.lang.Object{
public HelloWorld(int,int,int);
  Signature: (III)V
public java.lang.String GetSpeed();
  Signature: ()Ljava/lang/String;
public static void main(java.lang.String[]);
  Signature: ([Ljava/lang/String;)V
}
As an Amazon Associate we earn from qualifying purchases.
	
 
This mailing list archive is Copyright 1997-2025 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.