This is almost right, but there's a memory leak if MCStringCreateWithCStringAndRelease fails...
```
char *t_native;
if (MCJavaStringToNative(env, p_java_string, t_native))
{
  if (MCStringCreateWithCStringAndRelease(t_native, r_string))
    return true;
  MCCStringFree(t_native);
}
return false;
```
If the 'AndRelease' method fails it does not free the string going in, so you have to free it after (if the method succeeds, there's nothing more to do).