diff --git a/samples/java/jniviewer/app/src/main/jni/OcctJni_MsgPrinter.cxx b/samples/java/jniviewer/app/src/main/jni/OcctJni_MsgPrinter.cxx index 3c12ca6b6e..c47d9934cb 100644 --- a/samples/java/jniviewer/app/src/main/jni/OcctJni_MsgPrinter.cxx +++ b/samples/java/jniviewer/app/src/main/jni/OcctJni_MsgPrinter.cxx @@ -66,6 +66,6 @@ void OcctJni_MsgPrinter::send (const TCollection_AsciiString& theString, } jstring aJStr = myJEnv->NewStringUTF ((theString + "\n").ToCString()); - myJEnv->CallObjectMethod (myJObj, myJMet, aJStr); + myJEnv->CallVoidMethod (myJObj, myJMet, aJStr); myJEnv->DeleteLocalRef (aJStr); }