score:0

Accepted answer

package structure must correspond to directory structure in the ide. (this is unlike scalac.)

it's hard to tell from the info you present, but i can confirm that scala ide (on eclipse luna) will not offer "run as > scala application" if i remove the package declaration.

for example, if the class app in directory src/p/ (source file src/p/app.scala) is not in package p, then it won't offer to run it.

uncommenting the correct package declaration gets the run as menu back.

i can also verify that a debug config with stop in main and scala jvm launcher works as expected for app in the default package as well as in a named package. so i don't know how that could have broken for you.

score:0

you need to add extends app to your main objects.

object app  extends app {

  def main(args : array[string]): unit = {
    var logger = logger.getlogger(this.getclass())
     if (args.length < 3) {
      logger.error("=> wrong parameters number")
      system.err.println("usage: mainexample <path-to-files> <srccode> <tablename>")
      system.exit(1)
    }
      println("in main class")
}

Related Query

More Query from same tag