【问题标题】:major version 51 is newer than 50, the highest major version supported by this compiler主版本 51 比 50 新,此编译器支持的最高主版本
【发布时间】:2015-08-20 10:15:18
【问题描述】:

我当前的项目使用 jdk1.6.0_32、apache-ant-1.7.1 和 CVS 进行代码构建。

现在我们正在迁移到 jdk1.7.0_79。所以我修改了 JAVA_HOME 和用于构建代码的属性文件。

之后,当我尝试执行构建代码时,遇到以下错误。

[javac] warning: java\util\HashMap.class(java\util:HashMap.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[javac] It is recommended that the compiler be upgraded.
[javac] warning: java\lang\Object.class(java\lang:Object.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[javac] It is recommended that the compiler be upgraded.
[javac] warning: java\lang\String.class(java\lang:String.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[javac] It is recommended that the compiler be upgraded.
[javac] warning: java\io\Serializable.class(java\io:Serializable.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[javac] It is recommended that the compiler be upgraded.
[javac] warning: java\util\ArrayList.class(java\util:ArrayList.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[javac] It is recommended that the compiler be upgraded.
[javac] warning: java\util\Iterator.class(java\util:Iterator.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[javac] It is recommended that the compiler be upgraded.
[javac] warning: java\util\Set.class(java\util:Set.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[javac] It is recommended that the compiler be upgraded.
[javac] warning: java\util\List.class(java\util:List.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[javac] It is recommended that the compiler be upgraded.
[javac] warning: java\util\Date.class(java\util:Date.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[javac] It is recommended that the compiler be upgraded.
[javac] warning: java\net\InetAddress.class(java\net:InetAddress.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[javac] It is recommended that the compiler be upgraded.
[javac] warning: java\sql\Connection.class(java\sql:Connection.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[javac] It is recommended that the compiler be upgraded.
[javac] warning: java\sql\PreparedStatement.class(java\sql:PreparedStatement.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[javac] It is recommended that the compiler be upgraded.
[javac] warning: java\sql\ResultSet.class(java\sql:ResultSet.class): major version 51 is newer than 50, the highest major version supported by this compiler.
[javac] It is recommended that the compiler be upgraded.
[javac] warning: java\sql\ResultSetMetaData.class(java\sql:ResultSetMetaData.class): major version 51 is newer than 50, the highest major version supported by this compiler.

[javac] 建议升级编译器。

谁能帮我解决这个问题。

【问题讨论】:

    标签: jdk1.6 jdk1.7


    【解决方案1】:

    我们通过选择不使用 rt.jar 并改用其他 jar 文件解决了同样的问题和消息集。

    即我们现在使用 ST-4.0.7.jar ojdbc6.jar mail-1.4.jar commons-io-2.4.jar commons-email-1.3.3.jar

    【讨论】:

      猜你喜欢
      • 2016-11-08
      • 2016-11-09
      • 1970-01-01
      • 2014-07-29
      • 2016-09-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多