I want to call a java method from C that takes an argument T extends Number. I know java by default does the autoboxing for these types for you, but when I try to pass a float or jfloat in the JNI call, I get the following error:
FATAL ERROR in native method: Bad JNI oop argument
Is there an easy way to generate a Number java class or pass it to a Java method argument from C using JNI without caring about the actual primitive type?