So I want to be able to convert a jdouble to a jstring using the inbuilt Double.toString() from c++.
This is how I think I would do it.
jdouble result;
//Get the class for Double so we can get the method id of toString().
jclass doubleObjectClass = env->GetObjectClass("Ljava/lang/Double;");
//Get the Double.toString() method ID.
jmethodID doubleToStringMethodID = env->GetMethodID(doubleObjectClass, "toString",(Ljava/lang/String;");
//Call the toString() method on result.
jstring newString = env->CallObjectMethod(..., doubleToStringMethodID, result);
Now the problem is what is happening when I call getObjectClass & CallObjectMethod.
With getObjectClass, from memory it needs to take in a jobject, not a descript.
And with CallObjectMethod we need the Double object as a parameter (where '...' is).
So I don't know how to proceed as the documentation isn't helping atm.
Any help would be great thanks!