Hello Friends, My java default directory is C:\Program Files\Java\jdk1.6.0_02 and i saved a program in d:\Xyz.java and also i set the enviromental variable "Path" to "C:\Program Files\Java\jdk1.6.0_02\bin" and after that i complie the program javac Xyz.java it work but when i tried to run the program it shows an error. so please help me to sort out this error. thanks in advance. the error is
Exception in thread "main" java.lang.UnsupportedClassVersionError: Xy ted major.minor version 50.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source)
It sounds like an earlier JDK version (not 6) is used to run the program. What command are you using to run it? Does it work if you type "C:\Program Files\Java\jdk1.6.0_02\bin\java Xyz"?
Ping & DNS - updated with new look and Ping home screen widget
Joined: Jun 24, 2007
Firstly sorry for writing my problem in two places next time i remember this thing. actually i saved a file in d: directory so "C:\Program Files\Java\jdk1.6.0_02\bin\java Xyz" is not working but if i save a program in "C:\Program Files\Java\jdk1.6.0_02\bin\Xyz.java" directory then it works