Compile Scala code to .class file, in Java -


in project need replace java compilation task scala compilation task. first step need take find equivalent this: http://docs.oracle.com/javase/7/docs/api/javax/tools/javacompiler.html

is there in scala? brief google search gave no interesting results.

what need library allow me take file in form of list of lines or file on hd , compile it.

i don't need evaluate must able compiled .class file it.

you can invoke scalac processbuilder. otherwise, you'll need translate scala code question linked @mastov, it's pretty trivial:

import scala.collection.javaconversions; import scala.tools.nsc.*;  global g = new global(new settings());  global.run run = new g.run();  // assumes have java list of file names run.compile(javaconversions.asscalabuffer(filenames).tolist); 

Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

How to provide Authorization & Authentication using Asp.net, C#? -

How to use Authorization & Authentication in Asp.net, C#? -