Self-modify the classpath within a Scala script?

Posted by Alex R on Stack Overflow See other posts from Stack Overflow or by Alex R
Published on 2010-03-21T17:11:58Z Indexed on 2010/03/21 17:41 UTC
Read the original article Hit count: 164

Filed under:
|
|

I'm trying to replace a bunch of Linux shell scripts with Scala scripts.

One of the remaining challenges is how to scan an entire directory of JARs and place them into the classpath. Currently this is done in the shell script prior to invoking the scala JVM. I'd like to eliminate the shell script completely.

Is there an elegant scala idiom for this?

I have found this other question but in Java it seems hardly worthwhile to mess with it: http://stackoverflow.com/questions/252893/how-do-you-change-the-classpath-within-java

© Stack Overflow or respective owner

Related posts about scala

Related posts about shell-scripting