当前位置: 技术问答>linux和unix
关于csh执行后,提示:word too long是什么原因?
来源: 互联网 发布时间:2016-08-10
本文导语: 如题,下面是sh脚本内容,请教~xiexie 目的是设置CLASSPATH环境变量中加入java的lib包 ################################## #!/bin/csh setenv CLASSPATH .:${DLIB}/abdera-parser-0.4.0-incubating.jar:${DLIB}/abdera-i18n-0.4.0-incubating.jar:${DLIB}/abdera-extensions-m...
如题,下面是sh脚本内容,请教~xiexie
目的是设置CLASSPATH环境变量中加入java的lib包
##################################
#!/bin/csh
setenv CLASSPATH .:${DLIB}/abdera-parser-0.4.0-incubating.jar:${DLIB}/abdera-i18n-0.4.0-incubating.jar:${DLIB}/abdera-extensions-main-0.4.0-incubating.jar:${DLIB}/abdera-extensions-json-0.4.0-incubating.jar:${DLIB}/abdera-core-0.4.0-incubating.jar:${DLIB}/axiom-api-1.2.7.jar:${DLIB}/asm-2.2.3.jar:${DLIB}/aopalliance-1.0.jar:${DLIB}/antlr-2.7.7.jar:${DLIB}/ant-1.6.5.jar:${DLIB}/commons-codec-1.3.jar:${DLIB}/bcprov-jdk15-140.jar:${DLIB}/axiom-impl-1.2.7.jar:${DLIB}/commons-pool-1.3.jar:${DLIB}/commons-logging-1.1.1.jar:${DLIB}/commons-lang-2.4.jar:${DLIB}/commons-httpclient-3.1.jar:${DLIB}/commons-collections-3.1.jar:${DLIB}/cxf-manifest.jar:${DLIB}/cxf-2.1.4.jar:${DLIB}/geronimo-javamail_1.4_spec-1.3.jar
setenv CLASSPATH ${CLASSPATH}:${DLIB}/geronimo-annotation_1.0_spec-1.1.1.jar:${DLIB}/geronimo-activation_1.1_spec-1.0.2.jar:${DLIB}/FastInfoset-1.2.2.jar:${DLIB}/geronimo-ws-metadata_2.0_spec-1.1.2.jar:${DLIB}/geronimo-stax-api_1.0_spec-1.0.1.jar:${DLIB}/geronimo-servlet_2.5_spec-1.2.jar:${DLIB}/geronimo-jms_1.1_spec-1.1.1.jar:${DLIB}/geronimo-jaxws_2.1_spec-1.0.jar:${DLIB}/jaxb-impl-2.1.9.jar:${DLIB}/jaxb-api-2.1.jar:${DLIB}/jettison-1.0.1.jar:${DLIB}/jdom-1.0.jar:${DLIB}/jaxen-1.1.jar:${DLIB}/jaxb-xjc-2.1.9.jar:${DLIB}/jsr311-api-0.8.jar:${DLIB}/js-1.6R7.jar:${DLIB}/jra-1.0-alpha-4.jar:${DLIB}/jetty-util-6.1.9.jar:${DLIB}/jetty-6.1.9.jar:${DLIB}/oro-2.0.8.jar:${DLIB}/opensaml-1.1.jar:${DLIB}/neethi-2.0.4.jar:${DLIB}/log4j-1.2.15.jar
setenv CLASSPATH ${CLASSPATH}:${DLIB}/slf4j-jdk14-1.3.1.jar:${DLIB}/slf4j-api-1.3.1.jar:${DLIB}/serializer-2.7.1.jar:${DLIB}/saaj-impl-1.3.2.jar:${DLIB}/saaj-api-1.3.jar:${DLIB}/spring-dao-2.0.8.jar:${DLIB}/spring-core-2.0.8.jar:${DLIB}/spring-context-2.0.8.jar:${DLIB}/spring-beans-2.0.8.jar:${DLIB}/wsdl4j-1.6.2.jar:${DLIB}/velocity-1.5.jar:${DLIB}/spring-web-2.0.8.jar:${DLIB}/spring-support-2.0.8.jar:${DLIB}/spring-jms-2.0.8.jar:${DLIB}/wstx-asl-3.2.6.jar:${DLIB}/wss4j-1.5.5.jar:${DLIB}/xmlbeans-2.3.0.jar:${DLIB}/xml-resolver-1.2.jar:${DLIB}/xalan-2.7.1.jar:${DLIB}/XmlSchema-1.4.3.jar:${DLIB}/xmlsec-1.4.2.jar
cd ${DLIB}/../classes
echo ${CLASSPATH}
##########################################
运行脚本后,提示:word too long
目的是设置CLASSPATH环境变量中加入java的lib包
##################################
#!/bin/csh
setenv CLASSPATH .:${DLIB}/abdera-parser-0.4.0-incubating.jar:${DLIB}/abdera-i18n-0.4.0-incubating.jar:${DLIB}/abdera-extensions-main-0.4.0-incubating.jar:${DLIB}/abdera-extensions-json-0.4.0-incubating.jar:${DLIB}/abdera-core-0.4.0-incubating.jar:${DLIB}/axiom-api-1.2.7.jar:${DLIB}/asm-2.2.3.jar:${DLIB}/aopalliance-1.0.jar:${DLIB}/antlr-2.7.7.jar:${DLIB}/ant-1.6.5.jar:${DLIB}/commons-codec-1.3.jar:${DLIB}/bcprov-jdk15-140.jar:${DLIB}/axiom-impl-1.2.7.jar:${DLIB}/commons-pool-1.3.jar:${DLIB}/commons-logging-1.1.1.jar:${DLIB}/commons-lang-2.4.jar:${DLIB}/commons-httpclient-3.1.jar:${DLIB}/commons-collections-3.1.jar:${DLIB}/cxf-manifest.jar:${DLIB}/cxf-2.1.4.jar:${DLIB}/geronimo-javamail_1.4_spec-1.3.jar
setenv CLASSPATH ${CLASSPATH}:${DLIB}/geronimo-annotation_1.0_spec-1.1.1.jar:${DLIB}/geronimo-activation_1.1_spec-1.0.2.jar:${DLIB}/FastInfoset-1.2.2.jar:${DLIB}/geronimo-ws-metadata_2.0_spec-1.1.2.jar:${DLIB}/geronimo-stax-api_1.0_spec-1.0.1.jar:${DLIB}/geronimo-servlet_2.5_spec-1.2.jar:${DLIB}/geronimo-jms_1.1_spec-1.1.1.jar:${DLIB}/geronimo-jaxws_2.1_spec-1.0.jar:${DLIB}/jaxb-impl-2.1.9.jar:${DLIB}/jaxb-api-2.1.jar:${DLIB}/jettison-1.0.1.jar:${DLIB}/jdom-1.0.jar:${DLIB}/jaxen-1.1.jar:${DLIB}/jaxb-xjc-2.1.9.jar:${DLIB}/jsr311-api-0.8.jar:${DLIB}/js-1.6R7.jar:${DLIB}/jra-1.0-alpha-4.jar:${DLIB}/jetty-util-6.1.9.jar:${DLIB}/jetty-6.1.9.jar:${DLIB}/oro-2.0.8.jar:${DLIB}/opensaml-1.1.jar:${DLIB}/neethi-2.0.4.jar:${DLIB}/log4j-1.2.15.jar
setenv CLASSPATH ${CLASSPATH}:${DLIB}/slf4j-jdk14-1.3.1.jar:${DLIB}/slf4j-api-1.3.1.jar:${DLIB}/serializer-2.7.1.jar:${DLIB}/saaj-impl-1.3.2.jar:${DLIB}/saaj-api-1.3.jar:${DLIB}/spring-dao-2.0.8.jar:${DLIB}/spring-core-2.0.8.jar:${DLIB}/spring-context-2.0.8.jar:${DLIB}/spring-beans-2.0.8.jar:${DLIB}/wsdl4j-1.6.2.jar:${DLIB}/velocity-1.5.jar:${DLIB}/spring-web-2.0.8.jar:${DLIB}/spring-support-2.0.8.jar:${DLIB}/spring-jms-2.0.8.jar:${DLIB}/wstx-asl-3.2.6.jar:${DLIB}/wss4j-1.5.5.jar:${DLIB}/xmlbeans-2.3.0.jar:${DLIB}/xml-resolver-1.2.jar:${DLIB}/xalan-2.7.1.jar:${DLIB}/XmlSchema-1.4.3.jar:${DLIB}/xmlsec-1.4.2.jar
cd ${DLIB}/../classes
echo ${CLASSPATH}
##########################################
运行脚本后,提示:word too long
|
用循环分别执行
for $jarname in $namefile
do
setenv CLASSPATH .:${DLIB}/$jarname:
done
ps:我不太会csh,写的是bash的例子,你看着改改。
for $jarname in $namefile
do
setenv CLASSPATH .:${DLIB}/$jarname:
done
ps:我不太会csh,写的是bash的例子,你看着改改。
|
不知道是不是因为 path或者name太长。
linux下,C程序也会出现这种情况
|
把他分成好几个变量试试。Like:
CLASSPATH = XXXXX
CLASSPATH = $(CLASSPATH)XXXX
……………………
CLASSPATH = XXXXX
CLASSPATH = $(CLASSPATH)XXXX
……………………
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。