Eclipse will not recognize my Scala main -


what i've tried:

  1. ensuring scala perspective set, disabled, set again
  2. ensuring right click on object extends app
    • i never 'run scala application...' @ point
  3. defining explicit 'main' in object after removing 'extends app'

what 'run configurations..." when right-click on object main(). no matter there, e.g. enter name of object extends app or has explicit main, main() never found , classloader stack trace dumps indicating there no main.

while no scala compile errors, no matter try, never 'run as...scala application'.

code:

object fatfinger extends app {   import com.mongodb.casbah.imports._    import common._    import mongofactory._ */   object insert {      def main(args: array[string]) {        val apple = stock("aapl", 600)       val google = stock("goog", 650)       val netflix = stock("nflx", 60)        savestock(apple)       savestock(google)       savestock(netflix) }     def savestock(stock: stock) {       val mongoobj = buildmongodbobject(stock)       mongofactory.collection.save(mongoobj) } }  } 

stacktrace:

exception in thread "main" java.lang.noclassdeffounderror: insert caused by: java.lang.classnotfoundexception: insert @ java.net.urlclassloader$1.run(urlclassloader.java:202) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:190) @ java.lang.classloader.loadclass(classloader.java:306) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:301) @ java.lang.classloader.loadclass(classloader.java:247)  


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -