F11 ant crashes with Sun java

view full story

http://forums.fedoraforum.org – This probably isn't new, but it snuck up on me somehow. I usually use Eclipse for development and it's not having a problem, but on my laptop, I recently had to run ant manually and got a surprise: Code: 319 roland> ant Buildfile: build.xml BUILD FAILED java.lang.UnsupportedClassVersionError: Bad version number in .class file         at java.lang.ClassLoader.defineClass1(Native Method)         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)         at java.security.AccessController.doPrivileged(Native Method)         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)         at java.lang.ClassLoader.loadClass(ClassLoader.java:300)         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)         at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:88)         at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:278)         at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:185)         at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:107)         at org.apache.tools.ant.util.JAXPUtils.newParserFactory(JAXPUtils.java:120)         at org.apache.tools.ant.util.JAXPUtils.getNSParserFactory(JAXPUtils.java:104)         at org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.java:172)         at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:185)         at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:140)         at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93)         at org.apache.tools.ant.Main.runBuild(Main.java:743)         at org.apache.tools.ant.Main.startAnt(Main.java:217)         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) If I switch to Sun java 1.6.0, ant runs, but our code needs some modifications to run against Java 1.6 (e.g., new DataSource methods), so we are holding to 1.5 for now. The real problem here is that I have absolutely no idea what class is causing the problem. I'm pretty sure it is not one from our application as I've cleaned it completely and the problem occurs before anything is compiled. I've also gone so far as uninstalling the Java development environment (using yumex) and then reinstalling. I would expect that the problem is that something (maybe lots of somethings) in the development environment has been built against Java 1.6 which is why I can't run it with 1.5. But I don't know how to find that something or if I can do anything after finding it. Any clues here, or am I out of luck using Java 1.5 with Fedora 11? (HowTos)