tags:

views:

59

answers:

3

hi all. i'm a scala newbee. i have one question. in my code ,i try to import httpparse library like this

 scalac -classpath /home/kula/code/201005/kookle/lib/htmlparser.jar     crawler.scala

and i run this code.

scala main

and it tell me that

      java.lang.NoClassDefFoundError: org/htmlparser/Parser

at FetchActor$$anonfun$act$1$$anonfun$apply$1.apply(crawler.scala:21) at FetchActor$$anonfun$act$1$$anonfun$apply$1.apply(crawler.scala:13) at scala.actors.Reaction.run(Reaction.scala:78) at scala.actors.FJTask$Wrap.run(Unknown Source) at scala.actors.FJTaskRunner.scanWhileIdling(Unknown Source) at scala.actors.FJTaskRunner.run(Unknown Source)

i check the file./home/kula/code/201005/kookle/lib/htmlparser.jar and it is no problem.anyone can tell me how cause this bug?

+3  A: 
Arjan Blokzijl
A: 

Arjan's answer should work. However, I would recommend just using sbt and let it figure out all of this stuff for you.

Jackson Davis
A: 

hi all , some question that puzzled me. when we run scala code. we have two method. one is scalac mycode.scala scala OBJECT the other way is . scala mycode.scala so my question is . how different with this two method? i found i Confusion it. –

kula