jni problem, can not call method outside the jni method??
-
JNIEXPORT jstring JNICALL Java_playaudio_BeatTrack_myBeatTrack (JNIEnv *env, jobject obj, jstring wavfile) { const char* filename = env->GetStringUTFChars(wavfile,0); BeatTrack(filename); env->ReleaseStringUTFChars(wavfile,filename); return NULL; } for my BeatTrack method, I just need the filename, then it can run, if I comment the BeatTrack(filename);, then no problem, for the java calling, of course, my BeatTrack(const *char filename) has no problem, cause I have test it,, but I call this method in java, the error is as follows, Java VM: Java HotSpot(TM) Client VM (10.0-b19 mixed mode, sharing windows-x86) # Problematic frame: # C [beattrack.dll+0x130b] # # An error report file with more information is saved as: # D:\programs\playAudio\hs_err_pid11684.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. any idea??