I am running a program that requires the use of commons-logging-1.1.2.jar. When I try to compile it using:
scalac -classpath ~/jars/hadoop-core-1.2.1.jar:~/jars/commons-logging-1.1.2.jar:. HDFS_Test.scala
I get an error that says:
warning: Class org.apache.commons.logging.Log not found - continuing with a stub.
I know the class is in the jar but it still doesn't find it. Any idea what I could be doing wrong?
Bash only expands tildes in arguments when they are at the start of a word. Confusingly, bash does expand tildes after colons in variables , so CLASSPATH=~/jars/hadoop-core-1.2.1.jar:~/jars/commons-logging-1.1.2.jar scalac ...
should work, but if you want to use a command line argument you'll have to expand it by hand.
(My source here is http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_04.html )
Don't know why this worked but I replaced the ~ with the actual path and it cleared that error. ~ worked with the 1st class, but for some reason the 2nd class needed the full path.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.