« Return to Thread: dangerous import java.sql._

dangerous import java.sql._

by turicum :: Rate this Message:

Reply to Author | View in Thread

Hi everybody!

Yet another simple and mysterious problem: with the "import" statement, running the code will generate a "Exception in thread "main" java.lang.NoSuchMethodError: main". Removing the "import" solves the problem. What am I missing? Changing the name of the object does not modify the outcome. Thanks!

import java.sql._ // remove this line to get rid of the error msg

object Sqltest {
        def main(args: Array[String]) {
          print("OK")
        }
}

 « Return to Thread: dangerous import java.sql._