I will call java program by shell script.
This java start the thread and return the result to the shell script.
My problem is shell script is waiting upto stop the thread.
I want the result when thread is running in background.
please reply.
"result" and "running" are two mutually exclusive terms. The whole definition of "result" is what you get after it finishes running.
If you're actually looking for the success/failure of the attempt to launch a thread, that's different. However a Java thread runs in a JVM, and the JVM process itself doesn't complete until all of its internal threads (which may not correspond to OS threads) have terminated.
Which is all I can say without knowing more.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
when run this script, it run the test.java.
this java file call the thread.
So this script is completed, after stop the thread only.
But i want : when thread is running in background, the script file should print the success(It is in echo) and come out from sh.
reply me