Eclipse类的版本bug [英] Eclipse class version bug

查看:382
本文介绍了Eclipse类的版本bug的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在eclipse 3.4我试图对大型产品做一些性能测试,包括的库之一是来自Java3D项目的vecmath.jar(javax.vecmath包)。一切都工作正常,然后当试图运行它昨天我得到这个异常/错误不久后启动:

  java .lang.UnsupportedClassVersionError:javax / vecmath / Point2f(不受支持的major.minor版本49.0)

意味着我试图加载一个java 1.5类文件到1.4 jvm是不支持的。但是当我去类文件检查这个我在eclipse类文件查看器中看到:

 从Point2f.java编译(版本1.2:46.0​​,超级位)

所以类加载器说它是49.0版本,文件说它的46.0。我已经尝试清洗和完全重建项目,我已经确认该项目的编译器版本是1.4,JRE是1.4,并为运行配置选择1.4 jvm。



感谢



=== EDIT ===



事实证明,与java 1.4.2不兼容的java3d版本已安装在C:\Program Files\ java\j2re1.4.2_18\lib\ext。我安装了一个较新版本的Java3D在java6中玩,我猜它安装了所有我的JRE,即使是不兼容的那些libs。

解决方案

你的类路径上还有另一个javax.vecmath.Point2f吗?


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.

解决方案

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

这篇关于Eclipse类的版本bug的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆