Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Single file Runnable Jars in Scala with Eclipse

Tags:

eclipse

scala

Can anyone tell me how I can create a runnable JAR file from a Scala program using Eclipse and Scala 2.9.x ?

A quick Google brings up results like this ..

http://garyboone.com/2009/06/creating-single-file-runnable-jars-in-scala-and-eclipse/

Which uses a Java class to call the Scala main however it doesn't seem to work with Scala 2.9.

Thanks for your time.

Ian

like image 864
IanW Avatar asked Jun 14 '11 13:06

IanW


1 Answers

In Scala 2.9.1, you can simply create a .java file like this to be able to make use of Eclipse's Create Runnable JAR functionality:

public class ScalaRunner {
    public static void main(String[] args) {
        Main.main(args);
    }
}
like image 95
evilcandybag Avatar answered Sep 20 '22 14:09

evilcandybag