Exception in thread "main" java.lang.UnsupportedClassVersionError:

Exception in thread "main" java.lang.UnsupportedClassVersionError:

i keep getting this message when i try to run java class files. There is no problem compiling.

I know what the problem is. My JVM is a different version to my JDK. However i have never used either before on this machine so i have no previous versions installed. I just downloaded it all in one go from the sun website.

Does any one have any tips or ideas on what to do?

[463 byte] By [jamesjefffries1a] at [2007-10-3 5:57:40]
# 1
Probably some other application installed an older version jvm and your system is finding this version before it finds the JDK version. A simple fix might be changing your Path variable so the JDK bin directory is the first entry in the list of paths.
atmguya at 2007-7-15 0:39:05 > top of Java-index,Archived Forums,Java 2 Software Development Kit (J2SE SDK)...
# 2
you are trying to run it on a later version than the one used to compile this class
kilyasa at 2007-7-15 0:39:05 > top of Java-index,Archived Forums,Java 2 Software Development Kit (J2SE SDK)...
# 3
If the software that you downloaded was compiled with jdk1.5 i.e. using new features etc. and your jvm is the one previous to that then this exception is raised.
shaaf_shaha at 2007-7-15 0:39:05 > top of Java-index,Archived Forums,Java 2 Software Development Kit (J2SE SDK)...