1.用于代码启动tomcat,也可以用代码运行电脑应用程序 public static void main(String[] args) { /* new MyThread().start(); new MyThread().start(); new MyThread().start(); new MyThread().start(); new MyThread().start(); new MyThread().start();*/ if (java.awt.Desktop.isDesktop
外部sh脚本如下 #!/bin/bash while read LINE do echo "Hello $LINE!" case $LINE in all) tail -f -n200 /smapp/servers/tomcat/apache-tomcat-/logs/catalina.out & ;; start) /bin/bash /smapp/servers/tomcat/apache-tomcat-/bin/startup.sh ;; stop) /bin/bash