Using an infinite while is ok, but not a great idea as it could consume a lot of CPU time, I'd be surprised if it doesn't.
Here is the method I used below. And a side note is that if you dont put any System.out.print in your main for some reason the AI service.exe wrapper thinks your service ...
FOLLOW US
Get the latest news in Application Packaging