O
Oyvind Idland
I am trying to get an object-handle from a Java interface,
without luck. It works well for "normal" classes, but now
I seem to be out of luck.
The Java code implementation of the interface looks like
this:
package myClasses;
public interface someInterface{
public void someMethod(String str1, String str2);
}
The following lines works well (C++):
cls = env->FindClass("myClasses/someInterface");
mid = env->GetMethodID(cls, "someMethod", "(Ljava/lang/String;Ljava/lang/String
V");
Since there is no constructor here, I try to create the object-handle
like this:
obj = env->AllocObject(cls);
...which fails. I guess I my thinking may be wrong here.
Any suggestions is welcome
Oyvind
without luck. It works well for "normal" classes, but now
I seem to be out of luck.
The Java code implementation of the interface looks like
this:
package myClasses;
public interface someInterface{
public void someMethod(String str1, String str2);
}
The following lines works well (C++):
cls = env->FindClass("myClasses/someInterface");
mid = env->GetMethodID(cls, "someMethod", "(Ljava/lang/String;Ljava/lang/String
Since there is no constructor here, I try to create the object-handle
like this:
obj = env->AllocObject(cls);
...which fails. I guess I my thinking may be wrong here.
Any suggestions is welcome
Oyvind