已有的工程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

解决方案 »

  1.   

    应该是环境的问题看看你的jdk版本是不是你想要的版本,用java -version命令看看
      

  2.   

    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
      

  3.   

    使用jbuilderX有该问题
    该用Ecllipse编译就OK了~~
    JDK1.5带来一堆空指针,郁闷阿