In Linux systems
Demand:
(1) Use the. sh file to control the startup, stop, restart, and view status of Java programs
Requirements Upgrade:
(2) Deploy Java program to boot automatically, use service Hello Status/stop and other mode control program operation condition
I am referring to the following articles to achieve
Deploying Java programs in Linux
Http://www.linuxidc.com/Linux/2013-09/90673.htm
Setting up the Linux self-boot service
http://just4java.iteye.com/blog/474392
===================================================
Note: because of the new contact with Linux, according to the requirements, only to find the first red mark of the article, this can be read, and thus solve the need (1)
But when I want to solve the demand (2), quite not smooth, I looked at the information for a long time, did not find anything substantial, and then suddenly saw the second article of Red callout, so the problem solved
Two articles in red are combined to address both of these requirements
===================================================
You can also look at the following articles, a lot of places with the previous article is similar
Start the script automatically when the INIT.D service is powered on in CentOS Note: In fact, this article should also be able to solve the above requirements, but the feeling is a little unclear, at first did not understand
Http://www.111cn.net/sys/CentOS/68197.htm
Startup shell script for Linux under Java programs
http://magicmind.iteye.com/blog/411771
Deployment of Java programs in Linux, boot from boot (i)