Based on this article "Changing Java Library Path at Runtime" on fahd.blog, here is the scala release : And a small function to take a resource and save it to the chosen destination (based on Scala IO) :