This page is no longer maintained — Please continue to the home page at www.scala-lang.org

problem importing Groovy

1 reply
Marune
Joined: 2008-10-01,
User offline. Last seen 3 years 20 weeks ago.
.hmmessage P { margin:0px; padding:0px } body.hmmessage { font-size: 10pt; font-family:Verdana }
I'm trying to experiment a Scala-Groovy combo (Scala code will call Groovy scripts).
I'm using the NetBeans plugin, my groovy.jar is a is located in the same directory as my other libraries and is visible under the project's "libraries" folder in NetBeans.
One of my Scala class file do :

import groovy._
The error I get is : "groovy not visible".
I tried to create a GroovyShell instance to see if it was only a bug in the plugin, but the compiler gives an "GroovyShell is a unknown type" error.
I tried the same .jar in a Java project and it worked fine.
Thanks for any idea.






Jon Pretty
Joined: 2009-02-02,
User offline. Last seen 42 years 45 weeks ago.
Re: problem importing Groovy

Hi,

Skeptic 2000 wrote:
> I'm trying to experiment a Scala-Groovy combo (Scala code will call
> Groovy scripts).

Clearly something's amiss with the classpath...

What happens if you type:

scalac -cp path/to/groovy.jar path/to/your/file.scala

(or the equivalent for your OS)?

Jon

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland