Java Service Shutdown Hook

Hi All

Problem: We are developing an application that sends request to server when a computer shutsdown. The problem we are having is that we are not allowed to run the Java program as an application but it has to be some other way. One I can think of is making a Windows service. But shutdown hook method of Runtime works with applications only not services as service stop before the system shutdown. So now I have no idea and 28th is the last date for submission. Please give an answer to this as soon as possible and elaborate. Thank you.