Posted By

tuhlmann on 04/03/10


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 [email protected]
  5. !#
  6. import
  7. val world = new World
  8. world.hello

Report this snippet  

You need to login to post a comment.