How can I create a jar from some Scala source code? I want to use some of that code in a Clojure project of mine.
Is there a simpler way than doing batch files as in this SO question?
Thanks,
Alex
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Scala is in no way special when it comes to what you do with the
.classfiles produced by its compiler. Just use thejarcommand with thecaction flag.However, you will need to have the
scala-library.jarfile in the class-path when you run the program that uses the Scala-compiled.classfiles. And be careful to use thescala-library.jarfor / from the same Scala Development Kit that you used to compile the Scala source. As of yet, there isn’t inter-version binary compatibility for Scala-generated.classfiles.