title: Spring boot application cannot run using cmd
body: <p>I try to run my compiled jar file using java -jar jarfile.jar but it returning following error. </p>
  
  <pre><code>Exception in thread "main" java.lang.ClassNotFoundException: MainApplication
          at java.net.URLClassLoader.findClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:93)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:46)
          at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
          at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
          at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:593)
  </code></pre>
  
  
  
  <p>Why this is happening. When i run in the spring tool suit it run perfectly. This happen only when i try to run my application using CMD windows </p>