java.lang.UnsupportedClassVersionError
Hi All,
i have recently installed jdk-6-windows-i586.exe. I also set Path and classpath (environmental variables). I could able to compile the hello.java file but when i am trying to run using the command
java hello
i am getting the below error
Exception in thread "main" java.lang.UnsupportedClassVersionError: hello (Unsupported major.minor version 50.0)
at java.lang.classloader.defineclass0(Native Methos)
at java.lang.classloader.defineclass(Unknown Source)
at java.security.secureclassloader.defineclass(unknow n source)
at java.new.URLClassLoader.defineclass(Unknown source)
at .....
i have run the command
C:\>java -version
java version "1.4.2_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
C:\>javac -version
javac 1.6.0
I have checked the forum i found the same. Compiled the source code with higher version and trying to run the .class file with lower version. Then i tried by uninstalling jdk and re-install it. But i am facing the same problem.
My question is how to know/find which path command prompt is point for java.exe. So that i could uninstall and then re-install it again.
or if there are any other solution please help me.
Thanks,