tags:

views:

257

answers:

3

I'm trying to use XMLTask 1.16, but, unfortunately, I got error, java.lang.UnsupportedClassVersionError: Bad version number in .class file, all the time. But if I switch back to XMLTask 1.15, it work fine. Does anyone know how to make XMLTask 1.16 work with Ant.

+3  A: 

XMLTask 1.16 release notes does mention:

Support for Java 1.4 and before has been removed in this release.

So you need to upgrade your JRE.
You can no longer run XMLTask with a Java1.4 runtime, since the 1.16 released last September 2009.

VonC
Yes, that's right. Thank you guys. I could make it run on java 1.6.0_17 on Ubuntu platform, but not on iMac which has it own version of java. As you know, iMac doesn't give us enough freedom to install the version of Java we want.Thank you guys for the ideas.
A: 

I'm experiencing the same issue while executing xmlTask within Eclipse 3.5 in which the default installed JDK is configured to be 1.5.12. Replacement of the jar with XMLTask 1.15 works for me too, but I'm wondering what else could be missing so we could upgrade to 1.16. Thank you, Simeon

Simeon Leyzerzon
Like VonC and Skaffman said, we have to upgrade JRE and JDK. That's all we need to do. I already tried one on Ubuntu, but not on iMac yet. As you know, it's a bit hard to upgrade JRE and JDK on iMac.
Well, I'm seeing 1.6 is being mentioned. Have anyone ever tried in on JDK 1.5 and in Windows? This is the setup I have. Is it confirmed to work in JDK 1.5 at all?
Simeon Leyzerzon
A: 

Just in case anyone runs into the UnsupportedClassVersionError issue described above, looks like Xmltask ver. 1.16.1 has been compiled under JDK 1.5 to address it (as described here :http://blog.gmane.org/gmane.comp.java.ant.xmltask/month=20091001 , so if one can get 1.16.1 build of xmltask here: http://sourceforge.net/projects/xmltask/files/

and put it in the classpath, that eliminates the problem.

Hope it hepls someone.

Simeon Leyzerzon

Simeon Leyzerzon