1

I have the following code:

import scala.tools.nsc.{Settings,Global}
val setts = new Settings
setts.outputDirs.setSingleOutput("/sdat/projects/prStrat/Saves")
setts.classpath.append("/sdat/projects/prStrat/Saves/Strat.jar")   
val comp = new Global(setts)
val crun: comp.Run = new comp.Run
crun.compile(List("/sdat/projects/prStrat/Saves/StratSave.scala"))

I'm attempting to compile a single class. The compiler attempts to compile the designated file. But the compiler does not seem to be seeing anything in Strat.jar. How do I add a jar to the class path when running the compiler in code?

I'm using 2.11.0RC1

Rich Oliver
  • 6,001
  • 4
  • 34
  • 57

0 Answers0