title: getting java.lang.NoClassDefFoundError: org/springframework/core/env/DefaultEnvironment
body: <p>I have just started learning  Spring.I was trying constructor injection but got  error.</p>
  
  <p>Code:</p>
  
  <p><strong>HelloWorld.java</strong></p>
  
  <pre><code>package com.SpringIocTest.June5;
  public class HelloWorld {
  
      private  String message ;
      public String getMessage() {
          return message;
      }
  
      public void setMessage(String message) {
          this.message = message;
      }
  
      public HelloWorld(String message) {
          super();
          this.message = message;
      }
  }
  </code></pre>
  
  <p><strong>Start.java</strong></p>
  
  <pre><code>package com.SpringIocTest.June5;
  import org.springframework.context.ApplicationContext;
  import org.springframework.context.support.ClassPathXmlApplicationContext;
  
  public class Start {
      public static void main(String[] args) {
  
          ApplicationContext context = new ClassPathXmlApplicationContext(
              "Bean.xml");
          HelloWorld hw = (HelloWorld) context.getBean("hello");
  
          System.out.println("Message" + hw.getMessage());
  
      }
  }
  </code></pre>
  
  <p><strong>Bean.xml</strong></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-3.0.xsd"&gt;
  
      &lt;bean id="hello" class="com.SpringIocTest.June5.HelloWorld"&gt;
          &lt;constructor-arg&gt;
              &lt;value&gt;Welcome to Spring IoC!!!&lt;/value&gt;
          &lt;/constructor-arg&gt;
      &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>When i try to  run this  code  getting  following  error</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/core/env/DefaultEnvironment
      at org.springframework.context.support.AbstractApplicationContext.createEnvironment(AbstractApplicationContext.java:418)
      at org.springframework.context.support.AbstractApplicationContext.&lt;init&gt;(AbstractApplicationContext.java:227)
      at org.springframework.context.support.AbstractRefreshableApplicationContext.&lt;init&gt;(AbstractRefreshableApplicationContext.java:90)
      at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.&lt;init&gt;(AbstractRefreshableConfigApplicationContext.java:59)
      at org.springframework.context.support.AbstractXmlApplicationContext.&lt;init&gt;(AbstractXmlApplicationContext.java:61)
      at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:136)
      at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:83)
      at com.SpringIocTest.June5.Start.main(Start.java:15)
  Caused by: java.lang.ClassNotFoundException: org.springframework.core.env.DefaultEnvironment
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      ... 8 more
  </code></pre>
  
  <p>I am referring to <a href="http://www.tutorialspoint.com/spring/spring_hello_world_example.htm" rel="nofollow">this</a> tutorial.I have added all jars that are mention. Please let me know what i miss? </p>