No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK

  1. https://jingyan.baidu.com/article/6dad5075250734a123e36efa.html

Perhaps you are running on a JRE rather than a JDK?如何解决?

11-30

在windows环境下用idea打包项目都是没问题,把项目移到ubuntu里使用mvn clean package docker:build构建镜像报错rn[code=text][ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project microservice-discovery-eureka: Compilation failurern[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?rn[ERROR] -> [Help 1]rn[ERROR] rn[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.rn[ERROR] Re-run Maven using the -X switch to enable full debug logging.rn[ERROR] rn[ERROR] For more information about the errors and possible solutions, please read the following articles:rn[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExceptionrn[/code]rn这是java -version的信息rn[code=text]java version "1.7.0_79"rnJava(TM) SE Runtime Environment (build 1.7.0_79-b15)rnJava HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)rn[/code]rn这是mvn -version的信息rn[code=text]Apache Maven 3.3.9rnMaven home: /usr/share/mavenrnJava version: 1.7.0_79, vendor: Oracle CorporationrnJava home: /usr/lib/jdk1.7.0_79/jrernDefault locale: zh_CN, platform encoding: UTF-8rnOS name: "linux", version: "4.10.0-28-generic", arch: "amd64", family: "unix"rn[/code]rn本人对linux不太熟悉,折腾了1天了,希望大神帮助下[img=http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/9.gif][/img]rn

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试

关闭