Posted By

tuhlmann on 04/03/10


Tagged

shebang Scala classpath


Versions (?)

How a Scala script can specify what JARs should be added to its CLASSPATH


 / Published in: Scala
 

  1. #!/bin/sh
  2. L=`dirname $0`/../lib
  3. cp=`echo $L/*.jar|sed 's/ /:/g'`
  4. exec scala -classpath $cp $0 $@
  5. !#
  6. import com.my.special.World
  7. val world = new World
  8. world.hello

Report this snippet  

You need to login to post a comment.