我要拯救世界 发表于 2020-3-10 14:08:33

请大家帮忙看看下面的问题

我用命令行进行compile moven文件,可是一直报下面这个错,我也百度过,可是我的eclipse是用的jdk版本呀,而且也是1.8.请问这到底是哪里出现了问题呀{:5_107:}
COMPILATION ERROR :
-------------------------------------------------------------
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
1 error
-------------------------------------------------------------
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time:1.023 s
Finished at: 2020-03-10T13:51:26+08:00
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project maven01-model: Compilation failure
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

->

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException



lff 发表于 2020-3-10 19:50:45

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
你的环境下面没有安装JDK,或者安装了JDK之后没把java添加到环境变量里

我要拯救世界 发表于 2020-3-10 21:49:06

lff 发表于 2020-3-10 19:50
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
你 ...

请问是哪个环境下没有安装jdk呀,eclipse的jdk的环境变量配置了

我要拯救世界 发表于 2020-3-11 09:58:52

我要拯救世界 发表于 2020-3-10 21:49
请问是哪个环境下没有安装jdk呀,eclipse的jdk的环境变量配置了

我就是不知道他这个环境是指的哪个?

lff 发表于 2020-3-11 10:46:23

我要拯救世界 发表于 2020-3-10 21:49
请问是哪个环境下没有安装jdk呀,eclipse的jdk的环境变量配置了

系统环境变量
JAVA_HOME配置了没有
PATH环境里加了 %JAVA_HOME%\bin 没有

CrazyProgrammer 发表于 2020-3-17 19:46:18

classpathjava home都要配好~
页: [1]
查看完整版本: 请大家帮忙看看下面的问题