1

I'm trying to get the Scala interpreter to load certain files into the classpath automatically (or with as little effort from the user as possible).

What I've managed to do so far:

  1. Have a script that adds all the paths and load it as soon as the interpreter starts. The problem with this is that the interpreter insists on printing out the current classpath everytime I add something to it, so, if I have 100 :cp commands in the script file, the screen will get flooded with text. Not good. I can't silence the feedback with :silent and there's no way, AFAIK, to give :cp several paths.

  2. Have a script that calls scala with the proper arguments. I'm not sure, however, that scala -classpath file1:file2:file3 works. It's not ideal, however; I'd still prefer a variation on the first option.

Any suggestions how I could tackle this?

Cheers, Henry

Henry
  • 175
  • 1
  • 5
  • Related to: http://stackoverflow.com/questions/1010919/adding-files-to-java-classpath-at-runtime – paradigmatic Jul 26 '11 at 11:32
  • @paradigmatic: Thanks for the link, but it's not exactly what I was lookig for. Writing my own classpath loader isn't worth the effort in my case. – Henry Jul 26 '11 at 12:35
  • In that case I'd go for option 2. It allows room for other settings, like heap size, env. variables, etc. – paradigmatic Jul 26 '11 at 14:54

0 Answers0