If I issue:
$ scala -classpath poi-3.9/poi-3.9-20121203.jar
scala> import org.apache.poi.hssf.usermodel.HSSFSheet
import org.apache.poi.hssf.usermodel.HSSFSheet
Everything works ok, but if instead I issue:
$ scala
scala> :cp poi-3.9/poi-3.9-20121203.jar
Added '/home/sas/tmp/poi/poi-3.9/poi-3.9-20121203.jar'. Your new classpath is:
".:/home/sas/tmp/poi/poi-3.9/poi-3.9-20121203.jar"
Nothing to replay.
scala> import org.apache.poi.hssf.usermodel.HSSFSheet
<console>:7: error: object apache is not a member of package org
import org.apache.poi.hssf.usermodel.HSSFSheet
^
Am I missing something?
No one seems to mention this but the correct solution is using the :require
command:
scala> :require foo.jar
Added 'foo.jar' to classpath.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With