正解:POM依赖中添加
<dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<version>1.8</version>
<scope>system</scope>
<systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>
</dependency>
错解:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
<compilerArguments>
<verbose />
<bootclasspath>${java.home}\\lib\\rt.jar;${java.home}\\lib\\jce.jar</bootclasspath>
</compilerArguments>
</configuration>
</plugin>
这个会到导致无法检索到java.lang的错误
继续阅读与本文标签相同的文章
任家潮:勇当节能先锋
IPC之Binder
-
Hi拼团,第六代云服务器拼团购买更便宜,低至148元/年
2026-05-18栏目: 教程
-
汇编(五)栈、CPU提供的栈机制、push、pop指令
2026-05-18栏目: 教程
-
为什么绝大部分公司用钉钉上班不用微信,其实原因很简单
2026-05-18栏目: 教程
-
谷歌证实Pixel 4不支持Daydream,VR头显盒子也将停售
2026-05-18栏目: 教程
-
图解:抛弃IDE使用编译器亲手编译C
2026-05-18栏目: 教程
