use libraries in Scala

359 views Asked by At

I'm a bit of a noob to Scala at the moment and I'm messing about making little toy projects.

One of the things I want to do is a bit of web page scraping, a quick google search suggested using the dispatch package available from here http://dispatch.databinder.net/Download

The thing is I don't know where to put this package once downloaded and I don't know where Scala needs it to be for me to reference it.

I tried looking for it using sbaz available but it doesn't seem to be there either.

Any help would be appreciated.

1

There are 1 answers

1
Vasil Remeniuk On BEST ANSWER

Add JAR to the classpath:

scala -classpath <...>.jar

,or download SBT, Maven, any other build tool that can manage dependencies. E.g., in SBT you can simply put all the JARs you need under the /lib folder to get them automatically added to the classpath.