Whitespaces in CLASSPATH

谁说胖子不能爱 提交于 2019-11-28 23:39:32
stacker

See this article.

You could enclose either the full classpath in double qoutes

java -classpath "C:/Documents and Settings/user/project/lib/axis.jar; C:/Documents and Settings/user/project/lib/axis-ant.jar;" TestClient

or each jar in your classpath

java -classpath "C:/Documents and Settings/user/project/lib/axis.jar"; "C:/Documents and Settings/user/project/lib/axis-ant.jar;" TestClient

In your case something like that:

for JAR_FILE in `ls *.jar`
do
    CLASSPATH="$DIRECTORY_TO_LOOK_FOR_JARS/$JAR_FILE":$CLASSPATH
done

Hard to see, but I moved the closing double qoute.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!