title: Main program in java can not open Spring bean configuration file
body: <p>I just started to learn Spring Framework, installed Eclipse and added Spring and Maven. I made my first program, of course, Hello World but using spring beans.
  Everything was "by the book", I made some class, let's say Person, and main class that will instantiate it through beans in xml spring beans configuration file. I made beans.xml file right in my project just like in book example, and wrote following code:</p>
  
  <pre><code>package maven.aplikacije.Person;
  import org.springframework.context.ApplicationContext;
  import org.springframework.context.support.ClassPathXmlApplicationContext;
  public class App 
  {
   public static void main( String[] args )
   {
      ApplicationContext ac = new ClassPathXmlApplicationContext("beans.xml");
      Person helloBean = (Person)ac.getBean("person");
      helloBean.sayHello();
   }
   }
  </code></pre>
  
  <p>This is a beans.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans      http://www.springframework.org/schema/beans/spring-beans.xsd"&gt;
  &lt;bean id = "person" class = "maven.aplikacije.Person.Person"&gt;&lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>However, it does not work. It lists following error (among others):</p>
  
  <p>INFO: Loading XML bean definitions from class path resource [Person/beans.xml]
  Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [Person/beans.xml]; nested exception is java.io.FileNotFoundException: class path resource [Person/beans.xml] cannot be opened because it does not exist</p>
  
  <p>I tried to write</p>
  
  <pre><code>ApplicationContext ac = new ClassPathXmlApplicationContext("Person//beans.xml");
  </code></pre>
  
  <p>and plenty more different versions but nothing works.
  Of course, I also defined Person class. :)</p>
  
  <p>Why doesn't program "see" beans.xml file?</p>
  
  <p>Thank you in advance!</p>