In windows OS ,you can use JavaService.exe to run your java code as Windows Service,you can find this program in tomcat\bin\tomcat.exe or search JavaService key word in google(http://www.google.com). The first link is it's homepage, you can download it.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货