Bad version number in .class file
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
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:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:119)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:591)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:712)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:641)
at sun.applet.AppletPanel.run(AppletPanel.java:320)
at java.lang.Thread.run(Thread.java:595)
问题查找:
我们俩就开始在网上搜索这个异常的信息,知道这个异常是:编译成.class文件时使用的jre和运行时使用的不是一个版本。
问题解决:
在窗口->首选项(我的是中文包)中(如图1)
选择Java->编译器->已安装的JRE,(如图2)
按照你的选择,选中对应的JRE或者添加外部的JRE再选择即可,这是编译时使用的JRE。
然后Myeclipse->servers->Integrate sandbox(Myeclipse默认的Web容器)->Myeclipse tomcat->JDK(如图3)
最后Tomcat JDK name(这是Web 容器运行时使用的JRE)中选择和图2中一致的JRE即可,这个问题完美解决
分享到:
相关推荐
在MyEclipse中运行一个小应用程序或者在编辑一些程序时,出现java.lang.UnsupportedClassVersionError Bad version number in .class file异常,的解决办法!
NULL 博文链接:https://happypigs.iteye.com/blog/675096
tomcat:bad version number in class file的解决方法
这两天遇到了一个问题,原来使用的是FB 4 Bata 2中没有遇到的问题,在FB 4中遇到了,就是在使用Data/Services...Bad version number in .class file 问题,现在知道怎样一回事了,希望能帮更多人解决这方面的困扰。
文档是作者根据自己的实际经验总结的解决方法,文档中详细介绍了面对这个问题的解决步骤,有需要的朋友可以放心尝试!
JMF612 B MP Tool for XP vB.2.5(100713) 8CH_1_2_4_8_BK onlyV100531:1.First releaseV100531->V100601:1.Add error handling of build table.V100601->V100603:1.Report Bad Block Units.2....
<br>二、如果运行时有以上提示,则选择"Project"菜单中的"Project Properties",在弹出的窗口中左侧选择“ Build-->Java”,在右边的选项中有四个下拉框,就可以看到编译选项了,其中Compiler和Debug Option可以不用...
ALERT: java/lang/ClassFormatError: Bad version information. 大 | 中 | 小 Tags: j2me , jbuilder2006 JBuilder2006使用 JBuilder Wireless Toolkit 2.2 运行J2me程序,发生如下错误: ALERT: java/lang/...
gstreamer-plugins-bad-free-0.10.23-23.el7.i686.rpm
1、用AXMLPrinter2.jar反编译xxx.xml文件 解压xxx.apk,选择main.xml(也可选择其它xml文件...则是因为Java Compile Level和指定编译的JRE两者间的版本不一致导致;我的处理方法是重新按装JRE较高版本(我原来的是5.0)
第一次运行JB2006开如J2ME时出现 ALERT: java/lang/ClassFormatError: Bad version information.错误 点“启动”就会出错 我现在找到了答案 请你们下去看
解决linux磁盘扩容出现Bad magic number in super-block while trying报错的问题
5.1. 运行环境 5.2. 核心组件 5.2.1. SecurityContextHolder, SecurityContext 和 Authentication对象 5.2.1.1. 获得当前用户的信息 5.2.2. UserDetailsService 5.2.3. GrantedAuthority 5.2.4. 小结 5.3. ...
1.安装JDK1.6并配置环境变量 2.下载JBOSS,将下载的安装包直接解压到安装...注意:当我安装JDK1.5+JBOSSjboss-5.1.0.GA组合时,报版本冲突错误(Bad version number in .class file错误),我换成JDK1.6就不报错误了。
1.上传<br> <br> 在您的空间建立一个目录名为 wdb<br> <br> 请将压缩包解开并按照原结构上传至您的空间的 wdb目录下<br> <br> 大致结构如下,请注意相关目录/文件的属性<br> <br> 设置目录/文件的属性<br> <br> /wdb ...
- Display to screen or store hash and filename in a xml file. - Can recursively browse a directory ( ex fciv.exe c:\ -r ). - Exception list to specify files or directories that should not be computed....
启动时报错:-bash: /home/tlq/TLQ63/bin/tlq: /lib/ld-linux.so.2: bad ELF interpreter: 没有那个文件或目录, 发现是因为64位版本linux安装了32位的程序导致,问题解决需要用到以下文件支持:在银企直连工作...
Some Final Comments on the MOV Instructions<br><br>4.9 Laboratory ...File<br>4.9.4 Assembling Your Code with MASM<br>4.9.5 Debuggers and CodeView'<br>4.9.5.1 A Quick Look at CodeView<br>4.9.5.2 The ...
mysql默认是线程不安全的...[MDEV-9749] InnoDB receives 'Bad file descriptor' error, possibly related to feedback plugin Lost connection to MySQL server at 'handshake- reading initial communication packet'
运行环境vc++6.0,需要安装easyx图形库(CSDN上有下载资源),主要用到文件的读写操作,显示大小为128*64.