Scala script FAQ: How do I set the CLASSPATH in a Scala shell script?
If you need to set the CLASSPATH when executing a Scala script, the following example code at the top of your script should do the trick for you:
#!/bin/sh
exec scala -classpath "lib/htmlcleaner-2.2.jar:lib/scalaemail_2.9.1-1.0.jar:lib/stockutils_2.9.1-1.0.jar" "$0" "$@"
!#
As you can see from that code, I'm adding three jar files to my classpath at the beginning of my Scala shell script.