I created a simple GUI Application with Swing in Scala, and the “Run as Scala Application” in Eclipse works well. I used SBT as build tool, and i created some class files for the application logic + an singleton object in a file with the same name as the object, which has the main() method to start the application.
As I said, simply starting from within eclipse works. But generating a JAR File not (export -> …). Is there a simple way to do this?
As I have the latest stable scala version, many tips from the internetz seems to be outdated. Even the last comment in this blog
http://garyboone.com/2009/06/creating-single-file-runnable-jars-in-scala-and-eclipse/?wscr=1280×1024
doesn’t work. I just want a standalone executable JAR File, which I can share with others without technical knowledge… Any Ideas?
EDIT: I solved the Problem finally. The Problem was that Eclipse shows the Scala Librarys on Build Path, but didn’t really export them. May be a Bug, i don’t know. Finally, I added scala-library.jar and scala-swing.jar directly to the build path as external jars, ignoring the fact that eclipse shows them as already included -> everything works.
I found the Solution, see EDIT in the Question. I’ll play with the possible alternatives soon, but the eclipse related stuff now works for me. Maybe the guys from Scala IDE could have a look at the packaging of Scala Apps in Eclipse, there were still some hoops to jump through. 🙂