title: run the spring project from command line
body: <p>I have created one spring project in STS (spring source tool) which works (compile and execution) fine in STS, but when I am run the class file from terminal I am getting an error like this:</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.NoClassDefFoundError: com/XXXX/XXXX/Operations<br>
    Caused by: java.lang.ClassNotFoundException: com.XXXX.XXXX.Operations</p>
  </blockquote>
  
  <p>For reference below is my .classpath file: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;classpath&gt;
  &lt;classpathentry kind="src" output="target/classes" path="src/main/java" /&gt;
  &lt;classpathentry kind="src" output="target/test-classes"path="src/test/java" /&gt;
  &lt;classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/
  org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5" /&gt;
  &lt;classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER" /&gt;
  &lt;classpathentry kind="output" path="target/classes" /&gt;
  &lt;classpathentry exported="true" kind="var" path="M2_REPO" /&gt;
  &lt;/classpath&gt;
  </code></pre>