Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Framework jar in Grails application

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic