Win a copy of The Java Performance Companion this week in the Performance forum!
    Bookmark Topic Watch Topic
  • New Topic

Error in run a java program in another director

 
Parveen Dalal
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Report post to moderator
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 i set the environmental variable "Path" to "C:\Program Files\Java\jdk1.6.0_02\bin" after setting the environmental variable i go to the d: directory through command prompt and write javac Xyz.java so its works but when i write java Xyz it show an error. so give me the solution. the error is :

Exception in thread "main" java.lang.UnsupportedClassVersionError:
Xyz (Unsupported 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 Sour
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 Metho
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Sourc
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate post.
 
    Bookmark Topic Watch Topic
  • New Topic