Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Framework jar in Grails application

 
satya kiran
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to Groovy/Grails and bear with me for this basic question. I am using netbeans 6.7 IDE. Grails 1.1. I've Included xxxframework.jar(jar file has java classes) in the Grails application/lib folder. When i try to import the java class, i am getting classnotfound exception. If i enter the package name and hit ctrl+space it is showing the classes in the jar, but when i finish the import statement i.e., import com.trail.xxx.xx.classname it is giving me classname not defined (even compile giving me errors). Am i doing something wrong or missing any thing vital? Is there any way i can exlusively set the classpath in netbeans for the Grails Application?

Thanks in advance for your help

Thanks,
kiran
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adding the JAR to the lib folder only matters to grails when executing grails tasks. For your IDE to know anything about it you'll have to tell it. Just add the JAR to your classpath the same way you would for any netbeans project.
 
satya kiran
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Gregg. But If i open a grails project in netbeans i dont see any options to set the classpath ( for other projects such as java, j2ee etc., i can set the classpath). I googled with no luck.


Regards,
Kiran
 
satya kiran
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i refer a framework jar in a grails application ( I tried from command line and placed the jar in the lib folder. But still getting the class not found exception). I tried to modify the Ivy.xml with no luck. I couldn't locate any links on this. Any help/suggestions/links will be highly appreciated.

Thanks,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic