.class file created in Java on Ubuntu is not working in cmd in Windows?
<p>When i typed a small code in windows and compiled it a .class file produced,which should be processable i.e., it should show output after interpreting in every operating systems,and it was working well in terminal in Ubuntu(as i tried it in Ubuntu). But the same code when compiled in Ubuntu and a .class files was produced was not processable in cmd in windows i.e., cmd in windows doesnot shown an output rather shown this error</p>

<pre><code>Exception in thread "main" java.lang.UnsupportedClassVersionError: UbuntuCode : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:638)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:143)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:281)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:74)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:216)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:209)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:324)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:269)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:337)
</code></pre>

<p>where "UbuntuCode" is my file name. I already searched it on the internet but found only about installing jre,jvm,jdk or version mismatch and all. What is the reason behind this and how to resolve it. Thanks in advance. Help will be appreciated.</p>

<p><strong>edit:-</strong>
I had installed default jdk on Ubuntu and jdk1.7.0 on Windows</p>