UnsupportedClassVersionError when using Java 5.0



I installed a new version of java, 5.0 and tried to run my application
with the new java version but get the following error :

java.lang.UnsupportedClassVersionError: MyServer (Unsupported
major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
Exception in thread "main"

The program runs fine with 1.4.2, but fails with 5.0.

Could anyone suggest what might be wrong?

.



Relevant Pages

  • Re: invoking a java application by name
    ... Invoking an arbitrary java application by name without ... A shell alias (alias myServer 'javac myServer') would be a lighter ... even had a sort of "rehash" command implied in every compilation. ... avoid unwanted spam. ...
    (comp.lang.java.programmer)
  • Bug too weird for experts...vprize if you can figure it out.
    ... A call to write text to a figure fails with an error message as ... Java VM Version: Java 1.4.2_04 with Sun Microsystems Inc. Java ... Prev by Date: ...
    (comp.soft-sys.matlab)
  • Re: how to run a java program as a daemon?
    ... > I have a java program which is used as a server. ... > java -cp MyServer MyServer.Main ... $ nohup java -cp MyServer MyServer.Main & ...
    (comp.os.linux.networking)
  • Re: how to run a java program as a daemon?
    ... > java -cp MyServer MyServer.Main ... > But as soon as I exit the putty session, ...
    (comp.os.linux.networking)
  • Re: Newbie (Post#1): Help with Array of Objects
    ... I code Java in a TDD environment, ... > sense if you picture yourself in a war against the compiler to make your ... Best possible scenario. ... The code always fails at runtime. ...
    (comp.lang.java.help)