linux 下单独运行java程序
1、 javaweb项目
#!/bin/sh JAVA_HOME="/usr/java/jdk1.6.0_45" RUNNING_USER=root APP_HOME=/mvtech/netwatcher_meter/vasomp_web/WEB-INF APP_MAINCLASS=com.mvtech.app.main.StartServer CLASSPATH=$APP_HOME/classes for i in "$APP_HOME"/lib/*.jar; do CLASSPATH="$CLASSPATH":"$i" done JAVA_OPTS="-ms512m -mx512m -Xmn256m -Djava.awt.headless=true -XX:MaxPermSize=128m" JAVA_CMD="nohup $JAVA_HOME/bin/java $JAVA_OPTS -classpath $CLASSPATH $APP_MAINCLASS >/mvtech/myout.log 2>&1 &" su - $RUNNING_USER -c "$JAVA_CMD"
2、java项目
nohup java -Xms128m -Xmx512m -classpath yqanalyse.jar com.mvtech.cluster.app.ClusterN >/mvtech/myout.log 2>&1 &
3、windows批处理脚本格式
java -Xms128m -Xmx512m -classpath yqanalyse.jar com.mvtech.cluster.app.ClusterN
相关推荐
playlinuxxx 2020-11-11
farwang 2020-11-25
星愿心愿 2020-11-24
tianhuak 2020-11-24
zhjn0 2020-11-24
昭君出塞 2020-11-23
bluecarrot 2020-11-23
linuxwcj 2020-10-21
以梦为马不负韶华 2020-10-20
彼岸随笔 2020-10-20
yutou0 2020-10-17
applecarelte 2020-10-16
ourtimes 2020-10-16
waterhorse 2020-09-19
MRFENGG 2020-11-11
rainandtear 2020-10-30
kyssfanhui 2020-10-20