It's also possible that an exception is being thrown by the wait.
It's a good idea to always output something in the catch statement just in case an exception is thrown.
Something like
Code:
try {
// your code that may throw exception
} catch (Exception e) {
System.err.println(e); // this will print the stack trace of the exception
}
This way you'll be able to tell in the output if something wacky is happening.