user3178039
user3178039

Reputation: 31

GetMethodID method signature parameter

I have one function in Java with signature:

public static double[] getData()

And I want to get the method id of this function from the JNI interface using GetMethodID function. For that I have mentioned in function signature parameter as following:

"()[D"

But this is not working and I get exception as Method Not Found(return null).

Upvotes: 2

Views: 1029

Answers (1)

manuell
manuell

Reputation: 7620

You need to call GetStaticMethodID, instead of GetMethodID, as your method is a static one.

Upvotes: 3

Related Questions