The editor does not contain the main type

First of all, I would like to say that I read two other questions regarding the same problem, and the solutions presented in them did not help me. I tried to clear, rebuild, reopen, but it does not work. I am using eclipse for scala dev. This is a sample program that I am trying to get from it just casbah.

package com.examples.casbah import com.novus.casbah.mongodb.MongoConnection object newObject { def main(args: Array[String]): Unit = { val mongoConn = MongoConnection() val mongoDB = mongoConn("casbah_test") val builder = MongoDBObject.newBuilder builder += "foo" -> "bar" builder += "x" -> "y" builder += ("pie" -> 3.14) builder += ("spam" -> "eggs", "mmm" -> "bacon") // You must explicitly cast the result to a DBObject // to receive it as such; you can also request it 'asDBObject' val newObj = builder.result.asDBObject Console.println(("A", "ProGGram")) } } 

The following error appears in the eclipse error log:

An unexpected exception was sent.

this is a stack trace

I read one comment about trying to run by clicking on the root of the original project. But I only see Run as Java Applet and Run as Java Application. Unable to start scala application. I have to start it using Alt + Shift + XS

TIA.

+4
source share
1 answer

The best place for such questions is the Scala IDE user mailing list .

0
source

All Articles