一、编写启动Java程序shell脚本(smssend.sh)
二、修改名为rc.loacl的shell脚本
[url=http://blog.csdn.net/blueman2012/article/details/6655959]Linux 自启动 java程序 [/url]
[url=http://www.cnblogs.com/montya/archive/2011/09/09/2172001.html]解决linux下/etc/rc.local开机器不执行的原因[/url]
#!/bin/bash
#program
# This program is used to startup SmsSentTask.jar
#
export JAVA_HOME=/usr/java/jdk1.6.0_22
export JRE=/usr/java/jdk1.6.0_22/jre
export CLASSPATH=$JAVA_HOME/lib:$JRE/lib:.
export PATH=$PATH:$JAVA_HOME/bin/:$JRE/bin
java -jar /root/tas100/smsSendTask_fat.jar >>/root/tas100/smsSend22.log
二、修改名为rc.loacl的shell脚本
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
/root/tas100/smssend.sh
[url=http://blog.csdn.net/blueman2012/article/details/6655959]Linux 自启动 java程序 [/url]
[url=http://www.cnblogs.com/montya/archive/2011/09/09/2172001.html]解决linux下/etc/rc.local开机器不执行的原因[/url]