updated build JDK to 1.7
Added waiting for the event thread to die