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



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

Follow-Ups:

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.