Error while running mvn test -Dtest=ConnectionTest and mvn spring-boot:run

Hi, can anyone please help me to resolve this issue.?
I have already installed both JRE and JDK into my system.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project mflix: Compilation fail
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]

if you are using IntelliJ, go to:
Settings>Build, Execution, Deployment>Build tools>Maven>Importing
there set JDK for importer

1 Like