Can';我不能让Scala识别commons-logging-1.1.2.jar
我正在运行一个需要使用commons-logging-1.1.2.jar的程序。当我尝试使用以下方法编译它时:Can';我不能让Scala识别commons-logging-1.1.2.jar,scala,jar,Scala,Jar,我正在运行一个需要使用commons-logging-1.1.2.jar的程序。当我尝试使用以下方法编译它时: scalac -classpath ~/jars/hadoop-core-1.2.1.jar:~/jars/commons-logging-1.1.2.jar:. HDFS_Test.scala 我得到一个错误,上面写着: warning: Class org.apache.commons.logging.Log not found - continuing with a stub.
scalac -classpath ~/jars/hadoop-core-1.2.1.jar:~/jars/commons-logging-1.1.2.jar:. HDFS_Test.scala
我得到一个错误,上面写着:
warning: Class org.apache.commons.logging.Log not found - continuing with a stub.
我知道类在jar中,但它仍然没有找到它。知道我可能做错了什么吗?不知道为什么会这样,但我用实际路径替换了~并清除了该错误~与第一个类一起工作,但由于某些原因,第二个类需要完整路径。Bash仅在参数中的波浪号位于单词开头时展开波浪号。令人困惑的是,bash确实在变量中的冒号后面扩展了tildes,因此
CLASSPATH=~/jars/hadoop-core-1.2.1.jar:~/jars/commons-logging-1.1.2.jar scalac…
应该可以工作,但如果您想使用命令行参数,就必须手动扩展它
(我的来源是)您使用的是哪个shell?