sh执行文件是这样的:
# .bash_profile
# User specific environment and startup programs
export JAVA_HOME=/home/wls9/bea/jdk150_06
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$HOME/control
LANG=zh_CN.GB18030
export LANG
LANGUAGE=zh_CN.GB18030:zh_CN.GB2312:zh_CN
export LANGUAGE
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
# Oracle 10g DB Environment
export ORACLE_HOME=/u01/oracle/product/dbclt10gr2
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
#export NLS_LANG=American.UTF8
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
export ORACLE_SID=zyxdb
export NLS_DATE_FORMAT='YYYY/MM/DD HH24:MI:SS'
echo "starting run allot"
#run get data
cd /home/wls9/control/
java -cp allot.jar:log4j-1.2.13.jar:servlet.jar:commons-validator.jar:struts.jar:ojdbc14.jar:mail.jar:activation.jar:poi-2.5.jar:. c
om.main.BusinessMain
echo "allot end"
错误:
: command not found
: command not found
': not a valid identifier
: command not found
': not a valid identifier
: command not found
: command not found
': not a valid identifier
': not a valid identifier
: command not found
: command not found
starting run allot
: 没有那个文件或目录9/control/
Exception in thread "main" java.lang.NoClassDefFoundError: com/main/BusinessMain
allot end
: command not found
添加的包也没有错 ,确定环境没有问题 但就是报错啊 以前没有编写过sh执行文件 请各位大侠帮忙 小妹感激不尽!
# .bash_profile
# User specific environment and startup programs
export JAVA_HOME=/home/wls9/bea/jdk150_06
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$HOME/control
LANG=zh_CN.GB18030
export LANG
LANGUAGE=zh_CN.GB18030:zh_CN.GB2312:zh_CN
export LANGUAGE
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
# Oracle 10g DB Environment
export ORACLE_HOME=/u01/oracle/product/dbclt10gr2
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
#export NLS_LANG=American.UTF8
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
export ORACLE_SID=zyxdb
export NLS_DATE_FORMAT='YYYY/MM/DD HH24:MI:SS'
echo "starting run allot"
#run get data
cd /home/wls9/control/
java -cp allot.jar:log4j-1.2.13.jar:servlet.jar:commons-validator.jar:struts.jar:ojdbc14.jar:mail.jar:activation.jar:poi-2.5.jar:. c
om.main.BusinessMain
echo "allot end"
错误:
: command not found
: command not found
': not a valid identifier
: command not found
': not a valid identifier
: command not found
: command not found
': not a valid identifier
': not a valid identifier
: command not found
: command not found
starting run allot
: 没有那个文件或目录9/control/
Exception in thread "main" java.lang.NoClassDefFoundError: com/main/BusinessMain
allot end
: command not found
添加的包也没有错 ,确定环境没有问题 但就是报错啊 以前没有编写过sh执行文件 请各位大侠帮忙 小妹感激不尽!