我的 Web 应用程序在 JDK 1.7 上运行良好,但在 1.8 上崩溃,出现以下异常(在使用 Jetty 8 启动应用程序服务器期间)。我使用的是 Spring 版本:3.2.5.RELEASE。
例外:
org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet
我认为这个问题是由于 spring 和它所依赖的“asm.jar”库而发生的。
我该如何解决?
正如@prunge 和@Pablo Lozano 所说,如果您想将代码编译为 Java 8(--target 1.8),您需要 Spring 4,但如果您在 Spring 3.2.X 上运行,您仍然可以在编译为 Java 7 的 Java 8 上运行应用程序。
查看 http://docs.spring.io/spring/docs/current/spring-framework-reference/html/new-in-4.0.html