Application automatically terminates

Hi,

I'm an experienced developer, however I'm new to java development.

At this moment I'm working on a small java application that uses a timer. When I run my application as a Java Application in Eclipse, it will almost immediately terminate. When I call as System.out.println("Hello world!"); in the constructor, this will be executed, so i'm sure my application started running.

Your program only runs the TestTimer once because after the call to the constructor the run method is called when the next line sets up schedule parameters on your timer and then the method finishes. There are no more to execute in the main method so the application then terminates before the next timer event occurs. Try to add
int i = 0;
while (i == 0){
}
anywhere after your schedule statement. This is just a perpetual loop to demonstrate that if you keep your application alive the timer is actually running.