Topic: 求救~编译没问题,执行时出现提示: (UnsupportedClassVersionError:)

  Print this page

1.求救~编译没问题,执行时出现提示: (UnsupportedClassVersionError:) Copy to clipboard
Posted by: talentfly
Posted on: 2006-06-23 00:07

编译没有问题 执行时则出现这样的提示:(保证程序书写无误)
求各位大哥 帮忙~~~
java.lang.UnsupportedClassVersionError: MyFirst (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Exception in thread "main"

2.Re:求救~编译没问题,执行时出现提示: (UnsupportedClassVersionError:) [Re: talentfly] Copy to clipboard
Posted by: why
Posted on: 2006-06-23 00:22

look like your JRE is older than 1.5 while you're using JDK1.5 to compile the program, check JAVA_HOME and PATH

3.Re:求救~编译没问题,执行时出现提示: (UnsupportedClassVersionError:) [Re: talentfly] Copy to clipboard
Posted by: talentfly
Posted on: 2006-06-24 15:00

先谢谢你的提点:但是我检查了我的JRE版本没有问题。JAVA_HOME and PATH
也是对的。
这个问题是突然出现的,原来一直都能够正常运行的;而且现在如果我使用jcreator来运行的话又可以。真是头痛了~~~

4.Re:求救~编译没问题,执行时出现提示: (UnsupportedClassVersionError:) [Re: talentfly] Copy to clipboard
Posted by: why
Posted on: 2006-06-25 11:35

How do you 检查了JRE版本?

check
java -version

5.Re:求救~编译没问题,执行时出现提示: (UnsupportedClassVersionError:) [Re: talentfly] Copy to clipboard
Posted by: jerryikitty
Posted on: 2006-06-27 11:26

说明COMPILE和RUN时用到的JRE版本不一样。而且只可能是这个问题


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923