This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Groovy and the fly likes Framework jar in Grails application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Framework jar in Grails application" Watch "Framework jar in Grails application" New topic
Author

Framework jar in Grails application

satya kiran
Ranch Hand

Joined: Nov 07, 2000
Posts: 52
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

Joined: Jul 11, 2001
Posts: 15299
    
    6

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.


GenRocket - Experts at Building Test Data
satya kiran
Ranch Hand

Joined: Nov 07, 2000
Posts: 52
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

Joined: Nov 07, 2000
Posts: 52
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,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Framework jar in Grails application
 
Similar Threads
Grails - A Quick Start Guide - Questions
Lucene-Netbeans Behaviour
NetBeans IDE importing a project to cvs wont copy jar file from library.
Help need with import file in Netbeans
I hate spending 3 weeks on the tools, not coding