Linux开机启动Java程序 博客分类: LinuxJava linuxjava开机启动rc.local
程序员文章站
2024-03-25 22:24:04
...
一、编写启动Java程序shell脚本(smssend.sh)
二、修改名为rc.loacl的shell脚本
Linux 自启动 java程序
解决linux下/etc/rc.local开机器不执行的原因
#!/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
Linux 自启动 java程序
解决linux下/etc/rc.local开机器不执行的原因