File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes gettin error while running program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "gettin error while running program" Watch "gettin error while running program" New topic

gettin error while running program

swetha pubbishetty

Joined: Aug 01, 2010
Posts: 1
My problem is my code is compiling fine, but when i am running the program it showing the following error..please help me..

G:\srI\pr0gram>java My1
Exception in thread "main" java.lang.UnsupportedClassVersionError: My1 (Unsuppor
ted major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at Source)
at Source)
at$100(Unknown Source)
at$ Source)
at Method)
at 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)
Pramod P Deore
Ranch Hand

Joined: Jul 15, 2008
Posts: 632

Hi, Swetha Welcome to Javaranch.

It is because you are trying to run a Java program with a JVM version that was older than what I compiled it with. I think it is because of the classpath. Do you have set it correctly?

Life is easy because we write the source code.....
Darryl Burke

Joined: May 03, 2008
Posts: 5115

Nothing at all to do with the classpath.

1. Are you compiling and running the code on the same machine?
2. What are the outputs of the following commands?

luck, db
There are no new questions, but there may be new answers.
I agree. Here's the link:
subject: gettin error while running program
It's not a secret anymore!