zoukankan      html  css  js  c++  java
  • (class file version 53.0), Java Runtime versions up to 52.0错误的解决方法

    遇到这个错误是在Apache Tomcat上部署应用程序的时候遇到的,具体的错误描述是:

    java.lang.UnsupportedClassVersionError: HelloWorld has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) ...... ...... at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)

    主要的内容是:

    has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method)

    也就是当前的jre不能对程序进行编译,这个问题其实很简单,

    Tomcat的版本和JDK的版本不对应导致的,当前我运行的jdk是1.8而我用的Tomcat版本是Tomcat 9所以就会出现这个问题。

    解决方法:要么降低Tomcat的版本号,要不用JDK9,

    当然我用的是前者,毕竟JDK9刚刚出来,出错还是有可能的

    ok,解决了。

  • 相关阅读:
    正则表达式入门(3)
    正则表达式入门(2)
    正则表达式入门
    函数的参数传递
    python常用库之random
    插入排序与归并排序
    浅拷贝与深拷贝
    装饰器学习小程序
    Python的“is”与“==”
    Oracle中断中止exp/imp和expdp/impdp数据库导入导出
  • 原文地址:https://www.cnblogs.com/winterfells/p/7965596.html
Copyright © 2011-2022 走看看