Alert program in Java