File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Error in run a java program in another director Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic

Error in run a java program in another director

Parveen Dalal

Joined: Jun 24, 2007
Posts: 8
Hello Friends
my java default directory is "C:\Program Files\Java\jdk1.6.0_02" and I saved a program in d:\ 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 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 Sour
at Source)
at$100(Unknown Source)
at$ Source)
at Metho
at 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

Joined: Mar 22, 2005
Posts: 42965
Please do not post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate post.
I agree. Here's the link:
subject: Error in run a java program in another director
jQuery in Action, 3rd edition