views:

56

answers:

3

I am getting this bad version error as shown below. How to fix this. Do I need to have a separate jar file for each version of java?

Bad Version Error

+3  A: 

How to fix this.

Is this a plugin that you created, or did you download it from somewhere?

I've never seen this myself, but I suspect that you are running Eclipse using an older version of Java (e.g. 1.5) and trying to use a plugin that was compiled for Java 1.6. Assuming that is the case you can:

  • upgrade the JDK used to run Eclipse to 1.6,
  • try to find a version of the plugin that was compiled for the Java 1.5 platform, or
  • download the plugin sources and build it for Java 1.5 yourself.

Do I need to have a separate jar file for each version of java?

No. A JAR file built for a Java 1.5 target platform should also work on a Java 1.6 platform. (Just not the other way around ...)

Stephen C
It is my plugin. Yeah I built it in Java 1.6 and then tried to run it on 1.5, so it is not backward compatible.
fastcodejava
+2  A: 

I got similar kind of error once and I was not able to fix it. And I ended up removing the plugin (EMF Plugin) and installing it on a new setup of Eclipse.

Now, I use Yoxos On-demand where you can create/add/remove Eclipse plugins with no effort. This is the best Eclipse customizer I have seen.

zengr
+1  A: 

You are running on an older version of Java than the code was compiled for.

Thorbjørn Ravn Andersen