views:

331

answers:

3

In eclipse 3.4 I'm trying to do some performance tests on a large product, one of the included libraries is the vecmath.jar (javax.vecmath package) from the Java3D project. Everything was working fine and then when trying to run it yesterday I get this exception/error not long after starting it up:

java.lang.UnsupportedClassVersionError: javax/vecmath/Point2f (Unsupported major.minor version 49.0)

Which I believe means that I'm trying to load a java 1.5 class file into a 1.4 jvm which is unsupported. However when I went to the class file to check this I saw this in the eclipse class file viewer:

Compiled from Point2f.java (version 1.2 : 46.0, super bit)

So the class loader says it is version 49.0 but the class file says its 46.0. I've tried cleaning and fully rebuilding the project, I've confirmed that the compiler version for the project is 1.4, the JRE is 1.4 and for the run configuration the 1.4 jvm is selected. I'm totally stuck on this, does anyone have any idea what might be causing this?

Thanks

===EDIT===

It turns out that a version of java3d which was incompatible with java 1.4.2 had been installed in C:\Program Files\java\j2re1.4.2_18\lib\ext. I installed a newer version of Java3D to play around with in java6 and i guess it installed the libs in all my JREs even the ones which were incompatible.

A: 

I believe JRE 1.5 is required for the latest version of Java3D.

jassuncao
+2  A: 

Could there be another javax.vecmath.Point2f on your classpath?

matt b
A: 

Have you checked:

Window
    -> Preferences
        -> Java
            -> Compiler
                -> Compiler Compliance Level

To see if this value is screwy?

toolkit