Java编译错误信息提示java.lang.ExceptionInInitializer如何解决
作者:OpenWorld
时间:2023-04-28
浏览:3
错误提示错误提示信息为:Error:java:java.lang.ExceptionInInitializerErrorcom.sun.tools.javac.code.TypeTags如果使用Maven错误信息是一样的。[INFO]------------------------------------------------------------------------[INFO]BUILDFAILURE[INFO]------------------------------------------
本文目录
错误提示
错误提示信息为:
Error:java: java.lang.ExceptionInInitializerError com.sun.tools.javac.code.TypeTags

如果使用 Maven 错误信息是一样的。
[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.449 s [INFO] Finished at: 2020-02-26T08:34:45-05:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project core-java-annotations: Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
请问这是什么原因呢?

这个可能原因是你编译器的环境使用过高。但是你的依赖
org.projectlombok lombok 1.6.12 provided
过低导致的。
可以解决的办法是将你的编译 JDK 降到 1.8。
或者将 org.projectlombok 升级到最新的版本。
例如我们在 IntelliJ 中,使用 1.8 编译代码,就没有错误。

作者最新文章
Yandex新闻入口 俄罗斯Yandex官网资讯直达
2026-11-21 10:10
QQ影音工具箱找不到转码选项怎么办
2026-11-20 17:52
漫蛙漫画弹幕怎么用?互动评论教程
2026-11-20 13:32
小橡皮一键直达入口 小橡皮AI网页版登录地址
2026-11-20 10:22
Poki免安装电脑网页版入口
2026-11-12 19:19
热门文章
更多
精品专题
更多
Mac软件
更多
WINDOWS
更多

































