JDK1.5升级如何升呢?

microjuz 2006-01-04 01:05:02
已有的工程jre环境改为1.5,编译出现奇怪的错误!谁能告诉我何解?

"Utility.java":cannot access java.lang.Object,bad class file: c:\……\jre1.5.0\lib\……\Object.class,class file has wrong version 49.0,should be 48.0,please remove or make sure it appears in the correct subdirectory of the classpath……


class file has wrong version 49.0,should be 48.0 这其中的49.0和48.0什么意思?这种错误该如何处理呢?

每次给的分数都不算少了啊,怎么没有人回答呢?
http://community.csdn.net/Expert/TopicView1.asp?id=4489643
...全文
205 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
microjuz 2006-01-05
  • 打赏
  • 举报
回复
使用jbuilderX有该问题
该用Ecllipse编译就OK了~~
JDK1.5带来一堆空指针,郁闷阿
yingtju 2006-01-05
  • 打赏
  • 举报
回复
Wrong-version error.

Do you get a message that looks like this?

Error: cannot access javax.swing.JFrame
bad class file: C:\Program Files\Java\jre1.5.0\lib\rt.jar(javax/swing/JFrame.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.

It may mean that your computer has two different systems on it and is an inconsistent state. If your computer has jre5.0, then it cannot use SDK 4.7. Uninstall SDK4.7 and download JDK 5.0 and use its tools.jar
rickyelf 2006-01-05
  • 打赏
  • 举报
回复
应该是环境的问题

看看你的jdk版本是不是你想要的版本,用java -version命令看看
zhrenxi 2006-01-05
  • 打赏
  • 举报
回复
用的什么IDE工具?
hyron2005 2006-01-05
  • 打赏
  • 举报
回复
应该是环境变量设置问题吧,帮你顶一下。
microjuz 2006-01-04
  • 打赏
  • 举报
回复
又是自己顶,好郁闷阿!!

62,635

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧