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 Spring and the fly likes Wont let me import ApplicationContext 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 » Frameworks » Spring
Bookmark "Wont let me import ApplicationContext" Watch "Wont let me import ApplicationContext" New topic
Author

Wont let me import ApplicationContext

David Mbura
Ranch Hand

Joined: Apr 06, 2010
Posts: 65
HI guys
I just installed spring 2.5,and spring ide.for some reason ,when i want to import ApplicationContext and ClassPathXmlApplicationContext in the main class ,it says i should create classes for them (ApplicationContext and ClassPathXmlApplicationContext).I am using eclipse ,jdk 1.6.
Thank you in advance
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Is it a Spring project?
David Mbura
Ranch Hand

Joined: Apr 06, 2010
Posts: 65
yes it is a spring project.Seems like it cant recognize the packages (org.springframework.context.ApplicationContext;
org.springframework.context.support.ClassPathXmlApplicationContext;)
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Did you add the Spring Nature to your projects? Or is it set to be a Spring project?

Sounds totally like a classpath issue. Your classpath isn't pointing to the Spring jar files.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
David Mbura
Ranch Hand

Joined: Apr 06, 2010
Posts: 65
i use Eclipse and then added spring IDE through Eclipes update manager.It is all set,under spring project but i wonder why it cant find the spring jar?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Wont let me import ApplicationContext
 
Similar Threads
Spring Junit test issue
Scheduling job.
When to use ApplicationContext start()
ClassPathXmlApplicationContext won't resolve
Can I read Spring configuration twice in my applction?