title: Compile and execute Scala code at runtime
body: <p>Is is possible to compile and execute scala code as a string at runtime either in Scala or in Java? </p>
  
  <p>My idea is to build a DSL using Scala then let Java programmers use the DSL inside Java. </p>
  
  <p>I heard that the class scala.tools.nsc.Interpreter can do something like that, but when I imported it inside my scala file, I got "object tools is not a member of package scala."</p>
  
  <p>So could anybody give me a hint?</p>