vim /etc/rc.local

export JAVA_HOME=/usr/java/jdk1.7.0_71 /usr/local/tomcat/bin/startup.sh

refrence