| Author |
gettin error while running program
|
swetha pubbishetty
Greenhorn
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 java.security.SecureClassLoader.defineClass(Unknown Source)
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 Method)
at java.net.URLClassLoader.findClass(Unknown 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: 629
|
|
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
Bartender
Joined: May 03, 2008
Posts: 4167
|
|
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.
|
 |
 |
|
|
subject: gettin error while running program
|
|
|