java-code returns char-array to c++

Hello,

I have a problem with return a char[] from a java method to the native c++-code.

The code looks like this:

//in java

public static char[] draw( int j,int i){

char[] myc = new char[100];

...

return myc;

}

//in c++

jmethodID mid;

jchar jarr;

mid = env->GetStaticMethodID(cls, "draw", "(II)[C");

jarr = env->CallStaticObjectMethod(cls,mid,200,300);

In the last line of the c++ code happens this error: error C2440: '=' : cannot convert from 'class _jobject *' to 'class _jcharArray *'

Does anybody know how I get the jArray?

Thank you very much!

[669 byte] By [XMAS1000a] at [2007-11-26 15:35:50]
# 1
Cast it.jarr = (jIntArray)env->CallStaticObjectMethod(cls,mid,200,300);
bschauwejavaa at 2007-7-8 21:53:26 > top of Java-index,Java HotSpot Virtual Machine,Specifications...