UnsupportedClassVersionError Unsupported major minor version 50.

I installed Java 1.6 in C:\Program Files\Java\jdk1.6.0. I am able to compile a java files from the command prompt but when I try to run a java file I get the following error "UnsupportedClassVersionError Unsupported major minor version 50."

I am able compile and run the same file when I use TextPad.

I ran the command java -version and it tells me java version "1.3.1_01"

Java<TM> 2 Runtime Environment, Standard Edition (build 1.3.1_01)

Java HotSpot<TM> Client VM (build 1.3.1_01, mixed mode).

I have set the class_path to C:\Program Files\Java\jdk1.6.0\bin.

How can I resolve this issue and shouldn't the java version be 1.6.0?

Thanks.

Sami

[713 byte] By [samidurrania] at [2007-11-27 6:58:13]
# 1
I figured it out. I had set the CLASS_PATH but did not set the PATH .
samidurrania at 2007-7-12 18:48:50 > top of Java-index,Desktop,Runtime Environment...