why java thread in cvm sometimes seems hang until some console input