how to terminate Java thread gracefully
843829May 16 2002 — edited May 16 2002Hi,
I have a Java thread running from C++ using JNI. But the java thread is connecting to a server all the time, if I want the Java thread to stop, I have to call system.exit(0), to let it terminate.
But my problem is that, system.exit(0) will terminate the C++ main thread as well. Is there anyway, that I can only terminate the Java thread without stopping the C++ thread?
Thanks