linux中java进程启动脚本写法

#!/bin/bash
ulimit -n 65535
export LANG=en_US.UTF-8
/usr/java/jdk1.6.0_14/bin/java -cp "/deploy/netbar/netbar-dw/lib/activation-1.1.1.jar::/deploy/netbar/netbar-dw/classes/:" -server -Xms1024m -Xmx1024m -Xss128k -XX:+PrintGCDetails -XX:ParallelGCThreads=20 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC netbar.dw.main.Run > /dev/null &

 

 

#!/bin/bash
ulimit -n 65535
export LANG=en_US.UTF-8
/usr/local/jdk1.7.0_75/bin/java -cp "/usr/local/services/crm-server/lib/*:/usr/local/services/crm-server/conf/:" -Xms512m -Xmx512m cn.p
x.crm.thrift.server.Run > /dev/null &

 

 

 

加 > /dev/null 表示不再nohup中输出日志

 

带参数的话参数用$替换,从$1开始,多个参数为$1,$2,......

你可能感兴趣的:(java,linux,脚本,bash)