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

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 39541
Please do not post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate post.

Ping & DNS - updated with new look and Ping home screen widget
I agree. Here's the link:
subject: Error in run a java program in another director
Similar Threads
Error To run a java Program in another Dir
about path
problem on extending a class declared on the same package!!
getting a java.lang.ClassNotFoundException on installing a setup file
Runtine Exception UnsupportedClassVersionError