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 java problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "java problem" Watch "java problem" New topic

java problem

sukumar chellakannu

Joined: Nov 30, 2005
Posts: 4
hi iam using jdk1.5 ,i have worked with java programs previously..
now if try to run any programs iam getting an exception like this,

Exception in thread "main" java.lang.UnsupportedClassVersionError: TestEx (Unsupported major.minor version 49.0)

can anyone solve this please?

Perseverance is the only way to sucess.
tim bond

Joined: Nov 21, 2005
Posts: 18
please uninstall both the jdk 1.5 and the previous versions of jdk that you have installed. restart the system and then install only the jdk 1.5.
also check the path and classpath in environment variables of the device manager.
Sri Ram
Ranch Hand

Joined: Oct 03, 2005
Posts: 118
U dont need to uninstall both the jre. U have have multiple versions of JRE in ur System with out any problem

This exception can occur when the source is built targeting a JDK that is not supported by the JDK attempting to run it or the other way. In the above example, if the servlet was built targeting only JDK 1.5, but the web server runs JDK 1.4, the above exception will occur.

Check, Project Properties | Build | Java | Target VM, and verify that the Target VM indicates a JDK compatibility that is appropriate for the JDK that is running it.
Adam Richards
Ranch Hand

Joined: Nov 03, 2005
Posts: 135
Tip: Try to use more specific subject lines. The more meaningful your subject, the more meaningful your replies.
I agree. Here's the link:
subject: java problem
It's not a secret anymore!