Newbie Question: Scala Run/Debug Config for Scala Project

Hi everybody - am a total newbie in programming, Scala, IDEA, ... had some issues with installing sbt on my mac OSX Maven (10.9), but it looks like I've installed it finally.
So far I've got a first very simple Projet with a main() function.

import swing._

import swing.Dialog._

object TR {

  def main(args: Array[String]): Unit = {}

  showMessage(message = "Hallo Scala")

}

Now I've no idea how what to do to get it executed, to have in fact an messagebox.
I'ts probably to do with the debug/run configurations?
I tried the following:

  • Scala console. This seems to work, at least I don't get any error reports, and something happens. However, I would expect my message, and I don't get any messages.
  • scala Test. There ist an error message "ScalaTest ist not specified". However, I've no idea how and where to specify ScalaTest.
  • Spec2: Same Error message ("Spec2" not specified").

Which one do I actually need? What can I except? How can I test and debug my application? Can I do this from IDEA or do I have to export this somewhere and start manually? Or would I need a different config?
I attached some pics (hope this works, doesn't look like, actually...).scala_test_config.tiff
scala_specs2_config.tiff
Am very grateful for any hint!
Thomas

1 comment
Comment actions Permalink

1. the console is the REPL. you type in commands there, and they are executed (press ctrl+enter to execute them)
2. to run a main method (you called it a function), right click on it and select "run <your class here>" or  "debug <your class here>"
can't see the pictures, so i can't make any further qualified comment

i suggest to watch some "how do i set this up" videos on youtube, they are pretty much foolproof

0

Please sign in to leave a comment.