Linux启动java程序的通用处理工具
#!/bin/bash
JAVA_HOME=/usr2/exec_dir/java/jdk1.6.0_27
APPHOME=/usr2/exec_dir/manager/newIchk/Execution
MAIN=com.metarnet.Execution.ExecutionMain
CLASSPATH=$APPHOME/bin
for i in $APPHOME/LIB/*.jar
do
CLASSPATH=$CLASSPATH:$i
done
echo $CLASSPATH
${JAVA_HOME}/bin/java -DOmsExe -cp $CLASSPATH $MAIN 1 &
windows启动linux的脚本
@echo off
set JAVA_HOME=D:\java\JDK
setlocal enabledelayedexpansion
for /f "delims=" %%i in ('dir LIB /b ') do set CLASSPATH=!CLASSPATH!;./lib/%%i
set CLASSPATH=!CLASSPATH!;./bin;
#!/bin/bash
JAVA_HOME=/usr2/exec_dir/java/jdk1.6.0_27
APPHOME=/usr2/exec_dir/manager/newIchk/Execution
MAIN=com.metarnet.Execution.ExecutionMain
CLASSPATH=$APPHOME/bin
for i in $APPHOME/LIB/*.jar
do
CLASSPATH=$CLASSPATH:$i
done
echo $CLASSPATH
${JAVA_HOME}/bin/java -DOmsExe -cp $CLASSPATH $MAIN 1 &
windows启动linux的脚本
@echo off
set JAVA_HOME=D:\java\JDK
setlocal enabledelayedexpansion
for /f "delims=" %%i in ('dir LIB /b ') do set CLASSPATH=!CLASSPATH!;./lib/%%i
set CLASSPATH=!CLASSPATH!;./bin;
start %JAVA_HOME%/bin/javaw -DOmsExecution -cp "%CLASSPATH%" com.metarnet.Execution.ExecutionMain
-----------------------------------程序员 闫帆原创---------------------------------------
转载请注明原创人信息 程序员 闫帆yanfanvip