I\'m trying to use a JNI function to create a Java class and set some properties of that class using the DeviceId.java constructor method. I\'m able to get the constructor
When you called GetMethodID, you provided the signature for the two-arg constructor. Thus, you just need to pass your jstring and a jbytearray when you call NewObject - for example:
return (*env)->NewObject(env, c, cnstrctr, id, cache);
You don't need to call the setId and setCache methods unless you decide to call the 0-arg constructor - and that just complicates your code since you'll have to call GetMethodID for those and call them. Simpler to continue down the route you're on.