Re: JNI can't look up inner class



(ditto when I call javap -s Caller$Inner btw).

Show us result of that command. It should show get()'s signature.

jm = env->GetStaticMethodID(jcls, "get", "V(I)");

Method get() isn't static.
Signature is wrong. javap will show signature similar to constructor's but with changed return type from void to int.

# SIGSEGV (0xb) at pc=0xb79721cb, pid=16424, tid=3074430656
#
# Java VM: Java HotSpot(TM) Server VM (1.5.0_16-b02 mixed mode)
# Problematic frame:
# V [libjvm.so+0x2bf1cb]

This shouild never happen. If exceptions aren't thrown, allways check for possible error after a function call. The error is caused by NULL jm - this should be checked before passing jm to CallIntMethod().
.



Relevant Pages