JNI: Passing multiple parameters in the function signature for GetMethodID
Posted
by
Jary
on Stack Overflow
See other posts from Stack Overflow
or by Jary
Published on 2011-10-29T17:28:01Z
Indexed on
2012/10/15
9:38 UTC
Read the original article
Hit count: 267
I am trying to execute a function in Java (from C) that has the following signature:
public void execute(int x, int y, int action);
My problem is to define the function signature in GetMethodID:
env->GetMethodID(hostClass, "execute", "(I;I;I;)V");
The problem I ma getting is:
W/dalvikvm( 1849): Bogus method descriptor: (I;I;I;)V
W/dalvikvm( 1849): Bogus method descriptor: (I;I;I;)V
D/dalvikvm( 1849): GetMethodID: method not found: Lcom/device/client/HostConnection;.execute:(I;I;I;)V
I am not sure how to specify the method signature in GetMethodID (for 3 integers as parameters). I saw people use the ";" to separate parameters in other posts for the String and File class, but nothing with primitives like integer.
What would be the correct way to do this please?
Thank you.
© Stack Overflow or respective owner