Jboss from 5.x comes with its own Windows Service wrapper, jbosssvc.exe.
The service can be install using command: service.bat install
If you want to change service properties (like display name, name, description) you need to edit the service.bat file before installing the service.
The other solution would be to run the windows tools (like srvany.exe) to create the service, but in this case you need to create a custom run.bat were you will put all the arguments needed for IM to start.