编译时异常:错误版本50.0,应为49.0 [英] Exception while compiling: wrong version 50.0, should be 49.0
问题描述
Extract.java:6:无法访问jxl.read.biff.BiffException不良类文件:C:\Program Files\Java\jdk1 .5.0_01\jre\lib\ext\jxl.jar(jxl / read / biff / BiffException.class)
类文件错误版本50.0,应为49.0
请删除或制作确定它出现在classpa
th的正确子目录中。
import jxl.read.biff.BiffException;
^
1错误
编辑:
我可以使用JDK 1.6执行。由于JDK 1.6还必须与较低版本兼容,为什么不支持在JDK 1.5中编译的类文件。
p>您使用的库是使用Java 6编译的。
您的编译器是Java 5,这就是为什么它不了解这种格式。
要修复它,您必须获取1.5版本的库或将编译器升级到1.6,我建议稍后。
I am working an application with JXL API and when i tried compiling using eclipse IDE, it's working fine and the same is not compiling when i am trying to compile in Command prompt and showing the below exception..
Extract.java:6: cannot access jxl.read.biff.BiffException bad class file: C:\Program Files\Java\jdk1.5.0_01\jre\lib\ext\jxl.jar(jxl/read/biff/BiffException.class)
class file has wrong version 50.0, should be 49.0
Please remove or make sure it appears in the correct subdirectory of the classpa
th.
import jxl.read.biff.BiffException;
^
1 error
EDIT:
I am able to executing using JDK 1.6. Since JDK 1.6 must also be compatible with lower versions, why doesn't it support the class files which were compiled in JDK 1.5.
The library you're using was compiled with Java 6
Your compiler is Java 5 that's why it doesn't understand that format.
To fix it you have to get a 1.5 version of the library or upgrade your compiler to 1.6 I suggest the later.
这篇关于编译时异常:错误版本50.0,应为49.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!