Java is platform independent, as such it doesn't do OS specific things like installing as a Windows service.
But there are external pieces of software that can make it happen for you, they are simply called "service wrappers". There are a few, I don't know which one is good and which one is not. This one is on sourceforge:
Do a google search for "java windows service wrapper" to find more.