当前位置: 技术问答>linux和unix
linux下运行批处理奇怪的问题?大家来帮忙呀.................................
来源: 互联网 发布时间:2016-06-01
本文导语: 我的问题是这样的,我们web开发时有两个服务器,都是linux系统,路径与配置是一样的.我在12服务器上运行批处理是正常的,可在18上运行就报找不到类路径了.我的批处理就是运行一个.class文件,我仔细比较了,两台机子的路...
我的问题是这样的,我们web开发时有两个服务器,都是linux系统,路径与配置是一样的.我在12服务器上运行批处理是正常的,可在18上运行就报找不到类路径了.我的批处理就是运行一个.class文件,我仔细比较了,两台机子的路径一样,惟一不一样的是一个是日文系统,一个是英文系统,把批处理文件的内容拷出来运行是正常的,而用sh *.sh 运行时,就报路径找不到的错误.高手帮帮忙......下面是运行时情况,及bath中的内容.
[tomcat5@localhost classes]$ ls
0english.bat applicationContext-jdbc.xml com importILSdata.sh resc.properties
1chinese.bat applicationContext.xml commons-logging.properties jdbc.properties runedi.sh
application(cn).properties application_en_US.properties conf.properties log4j.properties runstatic.sh
application.properties application_zh_CN.properties exportILSdata.sh mail.properties vssver.scc
[tomcat5@localhost classes]$ cat importILSdata.sh
java -cp /usr/local/jakarta-tomcat-5.0.28/webapps/ILS/WEB-INF/lib/ojdbc14.jar:/usr/local/jakarta-tomcat-5.0.28/webapps/ILS/WEB-INF/lib/log4j-1.2.8.jar:/usr/local/jakarta-tomcat-5.0.28/webapps/ILS/WEB-INF/lib/commons-net-1.4.1.jar: com.ils.batch.edi.ImpAirReceiveData
java -cp /usr/local/jakarta-tomcat-5.0.28/webapps/ILS/WEB-INF/lib/ojdbc14.jar:/usr/local/jakarta-tomcat-5.0.28/webapps/ILS/WEB-INF/lib/log4j-1.2.8.jar:/usr/local/jakarta-tomcat-5.0.28/webapps/ILS/WEB-INF/lib/commons-net-1.4.1.jar: com.ils.batch.edi.ImpReceiveData
[tomcat5@localhost classes]$ sh importILSdata.sh
Exception in thread "main" java.lang.NoClassDefFoundError: com/ils/batch/edi/ImpAirReceiveData
Exception in thread "main" java.lang.NoClassDefFoundError: com/ils/batch/edi/ImpReceiveData
[tomcat5@localhost classes]$
[tomcat5@localhost classes]$ ls
0english.bat applicationContext-jdbc.xml com importILSdata.sh resc.properties
1chinese.bat applicationContext.xml commons-logging.properties jdbc.properties runedi.sh
application(cn).properties application_en_US.properties conf.properties log4j.properties runstatic.sh
application.properties application_zh_CN.properties exportILSdata.sh mail.properties vssver.scc
[tomcat5@localhost classes]$ cat importILSdata.sh
java -cp /usr/local/jakarta-tomcat-5.0.28/webapps/ILS/WEB-INF/lib/ojdbc14.jar:/usr/local/jakarta-tomcat-5.0.28/webapps/ILS/WEB-INF/lib/log4j-1.2.8.jar:/usr/local/jakarta-tomcat-5.0.28/webapps/ILS/WEB-INF/lib/commons-net-1.4.1.jar: com.ils.batch.edi.ImpAirReceiveData
java -cp /usr/local/jakarta-tomcat-5.0.28/webapps/ILS/WEB-INF/lib/ojdbc14.jar:/usr/local/jakarta-tomcat-5.0.28/webapps/ILS/WEB-INF/lib/log4j-1.2.8.jar:/usr/local/jakarta-tomcat-5.0.28/webapps/ILS/WEB-INF/lib/commons-net-1.4.1.jar: com.ils.batch.edi.ImpReceiveData
[tomcat5@localhost classes]$ sh importILSdata.sh
Exception in thread "main" java.lang.NoClassDefFoundError: com/ils/batch/edi/ImpAirReceiveData
Exception in thread "main" java.lang.NoClassDefFoundError: com/ils/batch/edi/ImpReceiveData
[tomcat5@localhost classes]$
|
貌似是缺省语言的问题...