今天从github上下载了一个开源项目,执行Maven compile时报致命错误: 在类路径或引导类路径中找不到程序包 java.lang
网上搜了下是,是maven在编译java类时,类文件的搜索路径有问题。bootclasspath节点下路径分隔符windows下使用分号(;)分隔,linux/mac下使用冒号(:)分隔。
报错日志
[INFO] ----------------< com.didichuxing.chefuqa:super-jacoco >----------------
[INFO] Building super-jacoco 1.0-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- resources:3.0.1:resources (default-resources) @ super-jacoco ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 4 resources
[INFO]
[INFO] --- compiler:3.7.0:compile (default-compile) @ super-jacoco ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 42 source files to D:\project\github\super-jacoco\target\classes
致命错误: 在类路径或引导类路径中找不到程序包 java.lang
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] An unknown compilation problem occurred
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
解决方法