title: Is my Java app running on OpenShift
body: <p>I am just getting started with server applications and cloud services, and have signed up to OpenShift.</p>
  
  <p>I have set everything up successfully using the Tomcat 7 cartridge, and pushed my first (very simple) code to the remote Git repository. It compiles and builds, but as far as I can see, when the application is restarted, doesn't run. I have checked all the logs, and there are no errors.</p>
  
  <p>I have also tried going into the target folder of the repo and running <code>java Main</code>, but I get this error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: Main (wrong name: helloworld/Main)
  </code></pre>
  
  <p>even though the Main.class file is right there.</p>
  
  <p>The class is as follows:</p>
  
  <pre><code>public class Main
  {
  
    public static void main(String[] args)
    {
        System.out.println("It works!");
    }   
  }
  </code></pre>
  
  <p>I'm obviously missing something and I've searched most of the similar answers to no avail - can someone tell me what I'm doing wrong?</p>