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

Re: dangerous import java.sql._

by Daniel Sobral :: Rate this Message:

Reply to Author | View in Thread

In that case, maybe  this will help as well:

import java.sql.{Array=>SQLArray, _}

On Wed, Jul 8, 2009 at 8:55 PM, turicum <turicum@...> wrote:

thank you for the prompt reply!
everything's fine now :)
Alex


Tony Morris-4 wrote:
>
> I shan't spoil it for you, but I shall give ye a hint.
>
> When one alters Array for the word scala.Array then all is well.
>
> turicum wrote:
>> 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")
>>      }
>> }
>>
>>
>>
>
> --
> Tony Morris
> http://tmorris.net/
>
>
>
>

--
View this message in context: http://www.nabble.com/dangerous-import-java.sql._-tp24401377p24401516.html
Sent from the Scala - User mailing list archive at Nabble.com.




--
Daniel C. Sobral

Something I learned in academia: there are three kinds of academic reviews: review by name, review by reference and review by value.

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