java-spring 錯誤 Unsupported class file major version 57


環境

ubuntu 18.04 jdk13

錯誤代碼

Caused by: 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: file ;

nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 57

解決方法

jdk13暫時不被支持,降級至jdk11,可正常運行

降級方法(IDEA)

  • File->Settings->Build,Execution,Deployment->Compiler->Java Compiler->project bytecode version 選擇11

  • File->Project Structure->Project->

    • Porject Sdk 選擇11

    • Porject language level 選擇11

  • File->Project Structure->Modules->language level 選擇11


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM