File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

Error in run a java program in another director

Parveen Dalal
Greenhorn

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:\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
Marshal

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

Let's continue the discussion in this duplicate post.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error in run a java program in another director